TYPO3 CMS  TYPO3_7-6
NumberViewHelperTest.php
Go to the documentation of this file.
1 <?php
3 
4 /* *
5  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6  * *
7  * It is free software; you can redistribute it and/or modify it under *
8  * the terms of the GNU General Public License, either version 3 of the *
9  * License, or (at your option) any later version. *
10  * *
11  * The TYPO3 project - inspiring people to share! *
12  * */
16 
21 {
25  protected $fixture;
26 
27  protected function setUp()
28  {
29  $this->fixture = $this->getMock(NumberViewHelper::class, ['renderChildren']);
30  $this->fixture->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
31  $renderingContext = $this->getMock(RenderingContext::class);
32  $this->fixture->setRenderingContext($renderingContext);
33  }
34 
39  {
40  $this->assertEquals('3,333.33', $this->fixture->render());
41  }
42 
47  {
48  $this->assertEquals('3.333,333', $this->fixture->render(3, ',', '.'));
49  }
50 }