/**
  * @test
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function pushAndGetFromStackWorks()
 {
     $rootNode = new Tx_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 Tx_Fluid_Core_Parser_ParsingState $state
  * @param string $text
  * @return void
  * @author Sebastian Kurfürst <*****@*****.**>
  * @author Karsten Dambekalns <*****@*****.**>
  */
 protected function textHandler(Tx_Fluid_Core_Parser_ParsingState $state, $text)
 {
     $node = $this->objectManager->create('Tx_Fluid_Core_Parser_SyntaxTree_TextNode', $text);
     $this->callInterceptor($node, Tx_Fluid_Core_Parser_InterceptorInterface::INTERCEPT_TEXT);
     $state->getNodeFromStack()->addChildNode($node);
 }