/**
  * @test
  */
 public function viewHelperChildNodesCanBeReadAgain()
 {
     $viewHelperChildNodes = $this->createMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\RootNode::class);
     $renderingContext = $this->createMock(\TYPO3\Fluid\Core\Rendering\RenderingContextInterface::class);
     $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext);
     $this->assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes());
     $this->assertSame($renderingContext, $this->widgetContext->getViewHelperChildNodeRenderingContext());
 }
 /**
  * @test
  */
 public function viewHelperChildNodesCanBeReadAgain()
 {
     $viewHelperChildNodes = $this->getMock('TYPO3\\Fluid\\Core\\Parser\\SyntaxTree\\RootNode');
     $renderingContext = $this->getMock('TYPO3\\Fluid\\Core\\Rendering\\RenderingContextInterface');
     $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext);
     $this->assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes());
     $this->assertSame($renderingContext, $this->widgetContext->getViewHelperChildNodeRenderingContext());
 }
 /**
  * @test
  */
 public function setChildNodesAddsChildNodesToWidgetContext()
 {
     $this->widgetContext = new \TYPO3\Fluid\Core\Widget\WidgetContext();
     $this->viewHelper->injectWidgetContext($this->widgetContext);
     $node1 = $this->getMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
     $node2 = $this->getMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\TextNode::class, array(), array(), '', FALSE);
     $node3 = $this->getMock(\TYPO3\Fluid\Core\Parser\SyntaxTree\AbstractNode::class);
     $rootNode = new \TYPO3\Fluid\Core\Parser\SyntaxTree\RootNode();
     $rootNode->addChildNode($node1);
     $rootNode->addChildNode($node2);
     $rootNode->addChildNode($node3);
     $this->objectManager->expects($this->once())->method('get')->with(\TYPO3\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($rootNode));
     $renderingContext = $this->getMock(\TYPO3\Fluid\Core\Rendering\RenderingContextInterface::class);
     $this->viewHelper->_set('renderingContext', $renderingContext);
     $this->viewHelper->setChildNodes(array($node1, $node2, $node3));
     $this->assertEquals($rootNode, $this->widgetContext->getViewHelperChildNodes());
 }