Revert "[BUGFIX] Nested FLUIDTEMPLATE doesn't work anymore" 52/21552/3
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 20 Jun 2013 20:19:32 +0000 (22:19 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 20 Jun 2013 20:30:45 +0000 (22:30 +0200)
This reverts commit 1ba19b02542087ee2f26407be28d938d663c17a4

The Unit-test breaks because it is based on a FEATURE that
has been merged in 6.1,
commit 17ba001ccaec73a90b499de19d1aeefc74242b44

Change-Id: If1fec2c489bc1258716171236165f9ce388559e4
Reviewed-on: https://review.typo3.org/21552
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php
typo3/sysext/frontend/Tests/Unit/ContentObject/FluidTemplateContentObjectTest.php

index 1a59779..92c5c6a 100644 (file)
@@ -74,7 +74,6 @@ class FluidTemplateContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstr
         * @return string The HTML output
         */
        public function render($conf = array()) {
-               $parentView = $this->view;
                $this->initializeStandaloneViewInstance();
 
                if (!is_array($conf)) {
@@ -90,10 +89,8 @@ class FluidTemplateContentObject extends \TYPO3\CMS\Frontend\ContentObject\Abstr
                $this->assignContentObjectDataAndCurrent($conf);
 
                $content = $this->renderFluidView();
-               $content = $this->applyStandardWrapToRenderedContent($content, $conf);
 
-               $this->view = $parentView;
-               return $content;
+               return $this->applyStandardWrapToRenderedContent($content, $conf);
        }
 
        /**
index a965c23..19d1916 100644 (file)
@@ -500,40 +500,5 @@ class FluidTemplateContentObjectTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                        ->with('baz', array('foo' => 'bar'));
                $this->fixture->render($configuration);
        }
-
-       /**
-        * @test
-        */
-       public function renderWorksWithNestedFluidtemplate() {
-               $this->addMockViewToFixture();
-               $configuration = array(
-                       '10' => 'FLUIDTEMPLATE',
-                       '10.' => array(
-                               'template' => 'TEXT',
-                               'template.' => array(
-                                       'value' => 'A{anotherFluidTemplate}C'
-                               ),
-                               'variables.' => array(
-                                       'anotherFluidTemplate' => 'FLUIDTEMPLATE',
-                                       'anotherFluidTemplate.' => array(
-                                               'template' => 'TEXT',
-                                               'template.' => array(
-                                                       'value' => 'B',
-                                               ),
-                                       ),
-                               ),
-                       ),
-               );
-               $expectedResult = 'ABC';
-
-               // not using mocks - actual rendering
-               $contentObjectRenderer = new \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
-               $fluidTemplateContentObject = new \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject(
-                       $contentObjectRenderer
-               );
-               $result = $fluidTemplateContentObject->render($configuration);
-
-               $this->assertEquals($expectedResult, $result);
-       }
 }
 ?>
\ No newline at end of file