コード例 #1
0
ファイル: ParsingStateTest.php プロジェクト: mbrodala/Fluid
 /**
  * @test
  */
 public function renderCallsTheRightMethodsOnTheRootNode()
 {
     $renderingContext = new RenderingContextFixture();
     $rootNode = $this->getMock(RootNode::class);
     $rootNode->expects($this->once())->method('evaluate')->with($renderingContext)->will($this->returnValue('T3DD09 Rock!'));
     $this->parsingState->setRootNode($rootNode);
     $renderedValue = $this->parsingState->render($renderingContext);
     $this->assertEquals($renderedValue, 'T3DD09 Rock!', 'The rendered value of the Root Node is not returned by the ParsingState.');
 }
コード例 #2
0
ファイル: ParsingStateTest.php プロジェクト: bwaidelich/Fluid
 /**
  * @test
  */
 public function renderCallsTheRightMethodsOnTheRootNode()
 {
     $renderingContext = $this->getMock('TYPO3Fluid\\Fluid\\Core\\Rendering\\RenderingContextInterface');
     $rootNode = $this->getMock('TYPO3Fluid\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
     $rootNode->expects($this->once())->method('evaluate')->with($renderingContext)->will($this->returnValue('T3DD09 Rock!'));
     $this->parsingState->setRootNode($rootNode);
     $renderedValue = $this->parsingState->render($renderingContext);
     $this->assertEquals($renderedValue, 'T3DD09 Rock!', 'The rendered value of the Root Node is not returned by the ParsingState.');
 }