[BUGFIX] Fluid unit test fatal
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 25 Aug 2012 12:12:08 +0000 (14:12 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 25 Aug 2012 12:13:30 +0000 (14:13 +0200)
Change-Id: If049766b53f376634617e3c0da0e1ab0df085fe5
Resolves: #40180
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14074
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/fluid/Tests/Unit/Core/Compiler/AbstractCompilerTemplateTest.php

index 15ee065..b981215 100644 (file)
@@ -39,9 +39,15 @@ class AbstractCompilerTemplateTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTes
         * @test
         */
        public function isDefaultEncodingIsSetThanDefaultEncodingWillReturned() {
-               $className = uniqid('TYPO3\\CMS\\Fluid\\Core\\Compiler\\AbstractCompiledTemplate');
-               eval(((('abstract class ' . $className) . ' extends TYPO3\\CMS\\Fluid\\Core\\Compiler\\AbstractCompiledTemplate {') . '  static protected $defaultEncoding = \'ISO-8859-1\';') . '}');
-               $this->assertSame('ISO-8859-1', $className::resolveDefaultEncoding());
+               $className = 'AbstractCompiledTemplate' . uniqid();
+               $fullClassName = 'TYPO3\\CMS\\Fluid\\Core\\Compiler\\' . $className;
+               eval(
+                       'namespace TYPO3\\CMS\\Fluid\\Core\\Compiler;' .
+                       'abstract class ' . $className . ' extends AbstractCompiledTemplate {' .
+                       '  static protected $defaultEncoding = \'ISO-8859-1\';' .
+                       '}'
+               );
+               $this->assertSame('ISO-8859-1', $fullClassName::resolveDefaultEncoding());
        }
 
 }