/**
  * @test
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function pushAndGetFromStackWorks()
 {
     $rootNode = new \F3\Fluid\Core\Parser\SyntaxTree\RootNode();
     $this->parsingState->pushNodeToStack($rootNode);
     $this->assertSame($rootNode, $this->parsingState->getNodeFromStack($rootNode), 'Node returned from stack was not the right one.');
     $this->assertSame($rootNode, $this->parsingState->popNodeFromStack($rootNode), 'Node popped from stack was not the right one.');
 }
 /**
  * Text node handler
  *
  * @param \F3\Fluid\Core\Parser\ParsingState $state
  * @param string $text
  * @return void
  * @author Sebastian Kurfürst <*****@*****.**>
  * @author Karsten Dambekalns <*****@*****.**>
  */
 protected function textHandler(\F3\Fluid\Core\Parser\ParsingState $state, $text)
 {
     $node = $this->objectFactory->create('F3\\Fluid\\Core\\Parser\\SyntaxTree\\TextNode', $text);
     if ($this->configuration !== NULL) {
         foreach ($this->configuration->getTextInterceptors() as $interceptor) {
             $node = $interceptor->process($node);
         }
     }
     $state->getNodeFromStack()->addChildNode($node);
 }