2 namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Parser;
28 $this->parsingState = new \TYPO3\CMS\Fluid\Core\Parser\ParsingState();
36 $rootNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode();
37 $this->parsingState->setRootNode($rootNode);
38 $this->assertSame($this->parsingState->getRootNode(), $rootNode,
'Root node could not be read out again.');
46 $rootNode = new \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode();
47 $this->parsingState->pushNodeToStack($rootNode);
48 $this->assertSame($rootNode, $this->parsingState->getNodeFromStack($rootNode),
'Node returned from stack was not the right one.');
49 $this->assertSame($rootNode, $this->parsingState->popNodeFromStack($rootNode),
'Node popped from stack was not the right one.');
57 $renderingContext = $this->getMock(\TYPO3\CMS\
Fluid\Core\Rendering\RenderingContextInterface::class);
59 $rootNode = $this->getMock(\TYPO3\CMS\
Fluid\Core\Parser\SyntaxTree\RootNode::class);
60 $rootNode->expects($this->once())->method(
'evaluate')->with($renderingContext)->will($this->returnValue(
'T3DD09 Rock!'));
61 $this->parsingState->setRootNode($rootNode);
62 $renderedValue = $this->parsingState->render($renderingContext);
63 $this->assertEquals($renderedValue,
'T3DD09 Rock!',
'The rendered value of the Root Node is not returned by the ParsingState.');