protected function setUp()
 {
     $this->fixture = $this->getMock(NumberViewHelper::class, array('renderChildren'));
     $this->fixture->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
     $renderingContext = $this->getMock(\TYPO3\CMS\Fluid\Tests\Unit\Core\Rendering\RenderingContextFixture::class);
     $this->fixture->setRenderingContext($renderingContext);
 }
Exemplo n.º 2
0
 protected function setUp()
 {
     $this->fixture = $this->getMock(NumberViewHelper::class, array('renderChildren'));
     $this->fixture->expects($this->once())->method('renderChildren')->will($this->returnValue(10000.0 / 3.0));
     $renderingContext = $this->getMock(RenderingContext::class);
     $this->fixture->setRenderingContext($renderingContext);
 }
Exemplo n.º 3
0
 /**
  * @test
  */
 public function renderUsesChildNodesIfValueArgumentIsOmitted()
 {
     $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
     $actualResult = $this->viewHelper->render();
     $this->assertEquals('12 KB', $actualResult);
 }