/** * Writes class loading information if not yet present * * @return Bootstrap * @internal This is not a public API method, do not use in own extensions */ public function ensureClassLoadingInformationExists() { if (!self::$usesComposerClassLoading && !ClassLoadingInformation::isClassLoadingInformationAvailable()) { ClassLoadingInformation::dumpClassLoadingInformation(); ClassLoadingInformation::registerClassLoadingInformation(); } return $this; }
/** * Writes class loading information if not yet present * * @return Bootstrap * @internal This is not a public API method, do not use in own extensions */ public function ensureClassLoadingInformationExists() { if (!self::$usesComposerClassLoading && !ClassLoadingInformation::classLoadingInformationExists()) { ClassLoadingInformation::writeClassLoadingInformation(); ClassLoadingInformation::registerClassLoadingInformation(); } return $this; }
call_user_func(function () { $testbase = new \TYPO3\CMS\Core\Tests\Testbase(); $testbase->enableDisplayErrors(); $testbase->defineBaseConstants(); $testbase->defineSitePath(); $testbase->defineTypo3ModeBe(); $testbase->setTypo3TestingContext(); $testbase->createDirectory(PATH_site . 'typo3conf/ext'); $testbase->createDirectory(PATH_site . 'typo3temp/assets'); $testbase->createDirectory(PATH_site . 'typo3temp/var/tests'); $testbase->createDirectory(PATH_site . 'typo3temp/var/transient'); $testbase->createDirectory(PATH_site . 'uploads'); // Retrieve an instance of class loader and inject to core bootstrap $classLoaderFilepath = __DIR__ . '/../../../../vendor/autoload.php'; if (!file_exists($classLoaderFilepath)) { die('ClassLoader can\'t be loaded. Please check your path or set an environment variable \'TYPO3_PATH_WEB\' to your root path.'); } $classLoader = (require $classLoaderFilepath); \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeClassLoader($classLoader)->setRequestType(TYPO3_REQUESTTYPE_BE | TYPO3_REQUESTTYPE_CLI)->baseSetup(); // Initialize default TYPO3_CONF_VARS $configurationManager = new \TYPO3\CMS\Core\Configuration\ConfigurationManager(); $GLOBALS['TYPO3_CONF_VARS'] = $configurationManager->getDefaultConfiguration(); // Avoid failing tests that rely on HTTP_HOST retrieval $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*'; \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->disableCoreCache()->initializeCachingFramework()->initializePackageManagement(\TYPO3\CMS\Core\Package\UnitTestPackageManager::class); if (!\TYPO3\CMS\Core\Core\Bootstrap::usesComposerClassLoading()) { // Dump autoload info if in non composer mode \TYPO3\CMS\Core\Core\ClassLoadingInformation::dumpClassLoadingInformation(); \TYPO3\CMS\Core\Core\ClassLoadingInformation::registerClassLoadingInformation(); } });
/** * Writes class loading information if not yet present * * @return Bootstrap * @internal This is not a public API method, do not use in own extensions * @deprecated since TYPO3 v8, will be removed in TYPO3 v9. Use the Install Tool to dump autoload information. */ public function ensureClassLoadingInformationExists() { if (!self::$usesComposerClassLoading && !ClassLoadingInformation::isClassLoadingInformationAvailable()) { GeneralUtility::logDeprecatedFunction(); ClassLoadingInformation::dumpClassLoadingInformation(); ClassLoadingInformation::registerClassLoadingInformation(); } return $this; }