[BUGFIX] Remove class loader in functional test tear down 75/27775/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Feb 2014 15:15:50 +0000 (16:15 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 21 Feb 2014 15:20:10 +0000 (16:20 +0100)
The functional test teardown does not remove the
class loader but removes the instance directories.
Because of this the TYPO3 class loader is still
triggered (by PHPUnit classes) and tries to write
things to a cache directory that does not exist any more.

Resolves: #56086
Releases: 6.2
Change-Id: Ib6acb588fb8b84c64d04882228822f6398838b6b
Reviewed-on: https://review.typo3.org/27775
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php

index 36f7ce0..d041466 100644 (file)
@@ -107,6 +107,8 @@ class FunctionalTestCaseBootstrapUtility {
         * @return void
         */
        public function tearDown() {
+               $classLoader = \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance('TYPO3\\CMS\\Core\\Core\\ClassLoader');
+               spl_autoload_unregister(array($classLoader, 'loadClass'));
                if (empty($this->identifier)) {
                        throw new Exception(
                                'Test identifier not set. Is parent::setUp() called in setUp()?',