‪TYPO3CMS  ‪main
InstallSqliteCoreEnvironment.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Codeception\Events;
21 use Codeception\Extension;
22 use TYPO3\TestingFramework\Core\Testbase;
23 
31 final class ‪InstallSqliteCoreEnvironment extends Extension
32 {
36  public static ‪$events = [
37  Events::TEST_BEFORE => 'bootstrapTypo3Environment',
38  ];
39 
46  public function ‪bootstrapTypo3Environment()
47  {
48  $testbase = new Testbase();
49  $testbase->defineOriginalRootPath();
50 
51  $instancePath = ‪ORIGINAL_ROOT . 'typo3temp/var/tests/acceptance';
52  $testbase->removeOldInstanceIfExists($instancePath);
53  putenv('TYPO3_PATH_ROOT=' . $instancePath);
54  putenv('TYPO3_PATH_APP=' . $instancePath);
55  $testbase->setTypo3TestingContext();
56 
57  $testbase->createDirectory($instancePath);
58  $testbase->setUpInstanceCoreLinks($instancePath);
59  touch($instancePath . '/FIRST_INSTALL');
60  }
61 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\InstallSqliteCoreEnvironment\bootstrapTypo3Environment
‪bootstrapTypo3Environment()
Definition: InstallSqliteCoreEnvironment.php:46
‪ORIGINAL_ROOT
‪const ORIGINAL_ROOT
Definition: phpstan-constants.php:4
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension
Definition: ApplicationComposerEnvironment.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\InstallSqliteCoreEnvironment
Definition: InstallSqliteCoreEnvironment.php:32
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\InstallSqliteCoreEnvironment\$events
‪static $events
Definition: InstallSqliteCoreEnvironment.php:36