2 namespace TYPO3\CMS\Core\Build;
17 use TYPO3\CMS\Core\Tests\BaseTestCase;
35 ->defineOriginalRootPath()
36 ->createNecessaryDirectoriesInDocumentRoot();
46 @ini_set(
'display_errors', 1);
59 if (!class_exists(
'PHPUnit_Framework_TestCase')) {
60 die(
'PHPUnit wasn\'t found. Please check your settings and command.');
62 if (!class_exists(BaseTestCase::class)) {
64 require_once __DIR__ .
'/../../../../vendor/autoload.php';
77 protected function defineOriginalRootPath()
79 if (!defined(
'ORIGINAL_ROOT')) {
84 if (!file_exists(ORIGINAL_ROOT .
'typo3/cli_dispatch.phpsh')) {
85 die(
'Unable to determine path to entry script. Please check your path or set an environment variable \'TYPO3_PATH_WEB\' to your root path.');
115 if (is_dir($directory)) {
118 @mkdir($directory, 0777,
true);
120 if (!is_dir($directory)) {
121 throw new \RuntimeException(
'Directory "' . $directory .
'" could not be created', 1404038665);
132 if (getenv(
'TYPO3_PATH_WEB')) {
133 $webRoot = getenv(
'TYPO3_PATH_WEB');
137 return rtrim(strtr($webRoot,
'\\',
'/'),
'/') .
'/';
141 if (PHP_SAPI !==
'cli') {
142 die(
'This script supports command line usage only. Please check your command.');