‪TYPO3CMS  ‪main
ApplicationComposerEnvironment.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 
26 final class ‪ApplicationComposerEnvironment extends Extension
27 {
31  protected array ‪$config = [
32  'typo3InstancePath' => 'typo3temp/var/tests/acceptance-composer',
33  ];
34 
35  public static ‪$events = [
36  Events::SUITE_BEFORE => 'bootstrapTypo3Environment',
37  ];
38 
39  public function ‪bootstrapTypo3Environment()
40  {
41  // @todo: ugly workaround for InstallTool/AbstractCest.php
42  $root = realpath(__DIR__ . '/../../../../../../../' . $this->config['typo3InstancePath']);
43  chdir($root);
44  putenv('TYPO3_ACCEPTANCE_PATH_WEB=' . $root . '/public');
45  putenv('TYPO3_ACCEPTANCE_PATH_VAR=' . $root . '/var');
46  putenv('TYPO3_ACCEPTANCE_PATH_CONFIG=' . $root . '/config');
47  putenv('TYPO3_ACCEPTANCE_INSTALLTOOL_PW_PRESET=1');
48  }
49 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\ApplicationComposerEnvironment\$config
‪array $config
Definition: ApplicationComposerEnvironment.php:31
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\ApplicationComposerEnvironment\$events
‪static $events
Definition: ApplicationComposerEnvironment.php:35
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension
Definition: ApplicationComposerEnvironment.php:18
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\ApplicationComposerEnvironment\bootstrapTypo3Environment
‪bootstrapTypo3Environment()
Definition: ApplicationComposerEnvironment.php:39
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\ApplicationComposerEnvironment
Definition: ApplicationComposerEnvironment.php:27