[TASK] Acceptance tests in controlled environment
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Build / FunctionalTestsBootstrap.php
1 <?php
2 /*
3 * This file is part of the TYPO3 CMS project.
4 *
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
8 *
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
11 *
12 * The TYPO3 project - inspiring people to share!
13 */
14
15 /**
16 * This file is defined in FunctionalTests.xml and called by phpunit
17 * before instantiating the test suites, it must also be included
18 * with phpunit parameter --bootstrap if executing single test case classes.
19 */
20
21 call_user_func(function () {
22 // Ensure cli only as security measure
23 if (PHP_SAPI !== 'cli') {
24 die('This script supports command line usage only. Please check your command.');
25 }
26
27 $testbase = new \TYPO3\CMS\Core\Tests\Testbase();
28 $testbase->enableDisplayErrors();
29 $testbase->defineBaseConstants();
30 $testbase->defineOriginalRootPath();
31 $testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests');
32 $testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/transient');
33 });