46 ->checkForCliDispatch()
49 ->createNecessaryDirectoriesInDocumentRoot()
50 ->includeAndStartCoreBootstrap()
51 ->initializeConfiguration()
52 ->finishCoreBootstrap();
61 @ini_set(
'display_errors', 1);
72 if (!defined(
'TYPO3_MODE')) {
76 array_shift($_SERVER[
'argv']);
77 $flatArguments = implode(
' ', $_SERVER[
'argv']);
78 echo
'Please run the unit tests using the following command:' . chr(10) .
79 sprintf(
'typo3conf/ext/phpunit/Composer/vendor/bin/phpunit %s', $flatArguments) . chr(10) .
90 protected function defineSitePath() {
94 define(
'PATH_thisScript', PATH_site .
'typo3/cli_dispatch.phpsh');
95 $_SERVER[
'SCRIPT_NAME'] = PATH_thisScript;
106 if (getenv(
'TYPO3_PATH_WEB')) {
107 $webRoot = getenv(
'TYPO3_PATH_WEB') .
'/';
109 $webRoot = getcwd() .
'/';
112 return strtr($webRoot,
'\\',
'/');
120 protected function setTypo3Context() {
122 define(
'TYPO3_MODE',
'BE');
124 define(
'TYPO3_cliMode', TRUE);
125 putenv(
'TYPO3_CONTEXT=Testing');
159 if (is_dir($directory)) {
163 if (!mkdir($directory, 0777, TRUE)) {
164 throw new \RuntimeException(
'Directory "' . $directory .
'" could not be created', 1423043755);
174 $bootstrapPath = PATH_site .
'/typo3/sysext/core/Classes/Core/Bootstrap.php';
175 if (!file_exists($bootstrapPath)) {
176 die(
'Bootstrap can\'t be loaded. Please check your path or set an environment variable \'TYPO3_PATH_WEB\' to your root path.');
178 require_once $bootstrapPath;
182 ->initializeClassLoader();
193 $configurationManager = new \TYPO3\CMS\Core\Configuration\ConfigurationManager();
194 $GLOBALS[
'TYPO3_CONF_VARS'] = $configurationManager->getDefaultConfiguration();
197 $GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'trustedHostsPattern'] =
'.*';
209 ->disableCoreAndClassesCache()
210 ->initializeCachingFramework()
211 ->initializeClassLoaderCaches()
212 ->initializePackageManagement(
'TYPO3\\CMS\\Core\\Package\\UnitTestPackageManager');
218 if (PHP_SAPI !==
'cli') {
219 die(
'This script supports command line usage only. Please check your command.');
if(PHP_SAPI !=='cli') $bootstrap
includeAndStartCoreBootstrap()
initializeConfiguration()
createDirectory($directory)
createNecessaryDirectoriesInDocumentRoot()
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]