diff --git a/Classes/Core/Functional/FunctionalTestCase.php b/Classes/Core/Functional/FunctionalTestCase.php index 7e71dfd7..58edd8e2 100644 --- a/Classes/Core/Functional/FunctionalTestCase.php +++ b/Classes/Core/Functional/FunctionalTestCase.php @@ -295,7 +295,9 @@ protected function setUp(): void 'extbase', 'fluid', ]; - if ((new Typo3Version())->getMajorVersion() < 13) { + if ((new Typo3Version())->getMajorVersion() < 13 + && class_exists(\TYPO3\CMS\Install\Exception::class) + ) { // @todo: Remove with next major TF version $defaultCoreExtensionsToLoad[] = 'install'; } diff --git a/Classes/Core/Testbase.php b/Classes/Core/Testbase.php index d3d4bb0d..9b04635d 100644 --- a/Classes/Core/Testbase.php +++ b/Classes/Core/Testbase.php @@ -236,19 +236,22 @@ public function setUpInstanceCoreLinks( // of the testing framework. // @todo: Remove else branch when dropping support for v12 $hasConsolidatedHttpEntryPoint = class_exists(CoreHttpApplication::class); + $installPhpExists = file_exists($instancePath . '/typo3/sysext/install/Resources/Private/Php/install.php'); if ($hasConsolidatedHttpEntryPoint) { $entryPointsToSet = [ $instancePath . '/typo3/sysext/core/Resources/Private/Php/index.php' => $instancePath . '/index.php', ]; - if (in_array('install', $coreExtensions, true)) { + if ($installPhpExists && in_array('install', $coreExtensions, true)) { $entryPointsToSet[$instancePath . '/typo3/sysext/install/Resources/Private/Php/install.php'] = $instancePath . '/typo3/install.php'; } } else { $entryPointsToSet = [ $instancePath . '/typo3/sysext/backend/Resources/Private/Php/backend.php' => $instancePath . '/typo3/index.php', $instancePath . '/typo3/sysext/frontend/Resources/Private/Php/frontend.php' => $instancePath . '/index.php', - $instancePath . '/typo3/sysext/install/Resources/Private/Php/install.php' => $instancePath . '/typo3/install.php', ]; + if ($installPhpExists) { + $entryPointsToSet[$instancePath . '/typo3/sysext/install/Resources/Private/Php/install.php'] = $instancePath . '/typo3/install.php'; + } } $autoloadFile = dirname(__DIR__, 4) . '/autoload.php';