/**
  * @test
  */
 public function pushAndGetFromStackWorks()
 {
     $rootNode = new 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.');
 }
 /**
  * @return ParsingState
  */
 protected function getParsingState()
 {
     $rootNode = new RootNode();
     $state = new ParsingState();
     $state->setVariableProvider($this->variableProvider);
     $state->setViewHelperResolver($this->viewHelperResolver);
     $state->setRootNode($rootNode);
     $state->pushNodeToStack($rootNode);
     return $state;
 }