From 86cef9f801f557be988b6b4fd6e62c6e772415fd Mon Sep 17 00:00:00 2001
From: Helmut Hummel <helmut.hummel@typo3.org>
Date: Fri, 21 Feb 2014 16:15:50 +0100
Subject: [PATCH] [BUGFIX] Remove class loader in functional test tear down

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php b/typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php
index 36f7ce062644..d04146674577 100644
--- a/typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php
+++ b/typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php
@@ -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()?',
-- 
GitLab