getWebRoot(), '/')); } if (!getenv('TYPO3_PATH_WEB')) { putenv('TYPO3_PATH_WEB=' . rtrim($testbase->getWebRoot(), '/')); } $testbase->defineSitePath(); $requestType = \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE | \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_CLI; \TYPO3\TestingFramework\Core\SystemEnvironmentBuilder::run(0, $requestType); $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/typo3conf/ext'); $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/typo3temp/assets'); $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/typo3temp/var/tests'); $testbase->createDirectory(\TYPO3\CMS\Core\Core\Environment::getPublicPath() . '/typo3temp/var/transient'); // Retrieve an instance of class loader and inject to core bootstrap $classLoader = require $testbase->getPackagesPath() . '/autoload.php'; \TYPO3\CMS\Core\Core\Bootstrap::initializeClassLoader($classLoader); // Initialize default TYPO3_CONF_VARS $configurationManager = new \TYPO3\CMS\Core\Configuration\ConfigurationManager(); $GLOBALS['TYPO3_CONF_VARS'] = $configurationManager->getDefaultConfiguration(); $cache = new \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend( 'core', new \TYPO3\CMS\Core\Cache\Backend\NullBackend('production', []) ); // Set all packages to active if (interface_exists(\TYPO3\CMS\Core\Package\Cache\PackageCacheInterface::class)) { $packageManager = \TYPO3\CMS\Core\Core\Bootstrap::createPackageManager(\TYPO3\CMS\Core\Package\UnitTestPackageManager::class, \TYPO3\CMS\Core\Core\Bootstrap::createPackageCache($cache)); } else { // v10 compatibility layer // @deprecated Will be removed when v10 compat is dropped from testing-framework $packageManager = \TYPO3\CMS\Core\Core\Bootstrap::createPackageManager(\TYPO3\CMS\Core\Package\UnitTestPackageManager::class, $cache); } \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Package\PackageManager::class, $packageManager); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::setPackageManager($packageManager); $testbase->dumpClassLoadingInformation(); \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances(); })();