getViewHelperChildNodes() public method

public getViewHelperChildNodes ( ) : TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode
return TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode
コード例 #1
0
 /**
  * @test
  */
 public function viewHelperChildNodesCanBeReadAgain()
 {
     $viewHelperChildNodes = $this->createMock(RootNode::class);
     $renderingContext = $this->createMock(RenderingContextInterface::class);
     $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext);
     $this->assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes());
     $this->assertSame($renderingContext, $this->widgetContext->getViewHelperChildNodeRenderingContext());
 }
 /**
  * @test
  */
 public function setChildNodesAddsChildNodesToWidgetContext()
 {
     $this->widgetContext = new \Neos\FluidAdaptor\Core\Widget\WidgetContext();
     $this->viewHelper->injectWidgetContext($this->widgetContext);
     $node1 = $this->createMock(AbstractNode::class);
     $node2 = $this->getMockBuilder(TextNode::class)->disableOriginalConstructor()->getMock();
     $node3 = $this->createMock(AbstractNode::class);
     $rootNode = new RootNode();
     $rootNode->addChildNode($node1);
     $rootNode->addChildNode($node2);
     $rootNode->addChildNode($node3);
     $renderingContext = $this->createMock(RenderingContextInterface::class);
     $this->viewHelper->_set('renderingContext', $renderingContext);
     $this->viewHelper->setChildNodes(array($node1, $node2, $node3));
     $this->assertEquals($rootNode, $this->widgetContext->getViewHelperChildNodes());
 }