/**
  * Setup fixture
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function setUp()
 {
     $this->renderingContext = new \F3\Fluid\Core\Rendering\RenderingContext();
     $this->mockObjectFactory = $this->getMock('F3\\FLOW3\\Object\\ObjectFactoryInterface');
     $this->renderingContext->injectObjectFactory($this->mockObjectFactory);
     $this->templateVariableContainer = $this->getMock('F3\\Fluid\\Core\\ViewHelper\\TemplateVariableContainer');
     $this->renderingContext->setTemplateVariableContainer($this->templateVariableContainer);
     $this->controllerContext = $this->getMock('F3\\FLOW3\\MVC\\Controller\\Context', array(), array(), '', FALSE);
     $this->renderingContext->setControllerContext($this->controllerContext);
     $this->viewHelperVariableContainer = $this->getMock('F3\\Fluid\\Core\\ViewHelper\\ViewHelperVariableContainer');
     $this->renderingContext->setViewHelperVariableContainer($this->viewHelperVariableContainer);
 }
 /**
  * Test for CDATA support
  *
  * @test
  * @author Sebastian Kurfürst <*****@*****.**>
  */
 public function fixture12ReturnsCorrectlyRenderedResult()
 {
     $templateSource = file_get_contents(__DIR__ . '/Fixtures/TemplateParserTestFixture12_cdata.html', FILE_TEXT);
     $variableContainer = new \F3\Fluid\Core\ViewHelper\TemplateVariableContainer(array());
     $this->renderingContext->setTemplateVariableContainer($variableContainer);
     $parsedTemplate = $this->templateParser->parse($templateSource);
     $result = $parsedTemplate->render($this->renderingContext);
     $expected = '<f3:for each="{a: {a: 0, b: 2, c: 4}}" as="array">' . chr(10) . '<f3:for each="{array}" as="value">{value} </f3:for>';
     $this->assertEquals($expected, $result, 'Fixture 12 was not rendered correctly. This hints at some problem with CDATA handling.');
 }