‪TYPO3CMS  9.5
BackendCoreEnvironment.php
Go to the documentation of this file.
1 <?php
2 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 
18 use Codeception\Event\SuiteEvent;
20 use TYPO3\CMS\Styleguide\TcaDataGenerator\Generator;
21 use TYPO3\TestingFramework\Core\Acceptance\Extension\BackendEnvironment;
22 
26 class ‪BackendCoreEnvironment extends BackendEnvironment
27 {
33  protected ‪$localConfig = [
34  'coreExtensionsToLoad' => [
35  'core',
36  'beuser',
37  'extbase',
38  'fluid',
39  'filelist',
40  'extensionmanager',
41  'setup',
42  'rsaauth',
43  'backend',
44  'about',
45  'belog',
46  'install',
47  'frontend',
48  'recordlist',
49  'redirects',
50  'reports',
51  'sys_note',
52  'scheduler',
53  'tstemplate',
54  ],
55  'testExtensionsToLoad' => [
56  'typo3conf/ext/styleguide'
57  ],
58  'xmlDatabaseFixtures' => [
59  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/be_users.xml',
60  'typo3/sysext/core/Tests/Acceptance/Fixtures/be_sessions.xml',
61  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/be_groups.xml',
62  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/sys_category.xml',
63  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_extension.xml',
64  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_repository.xml',
65  ],
66  ];
67 
73  public function ‪bootstrapTypo3Environment(SuiteEvent $suiteEvent)
74  {
75  parent::bootstrapTypo3Environment($suiteEvent);
76  // styleguide generator uses DataHandler for some parts. DataHandler needs an initialized BE user
77  // with admin right and the live workspace.
79  ‪$GLOBALS['BE_USER']->user['admin'] = 1;
80  ‪$GLOBALS['BE_USER']->user['uid'] = 1;
81  ‪$GLOBALS['BE_USER']->workspace = 0;
83 
84  $styleguideGenerator = new Generator();
85  $styleguideGenerator->create();
86  }
87 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension
Definition: BackendCoreEnvironment.php:3
‪TYPO3\CMS\Core\Core\Bootstrap\initializeBackendUser
‪static Bootstrap null initializeBackendUser($className=\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class)
Definition: Bootstrap.php:956
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment\bootstrapTypo3Environment
‪bootstrapTypo3Environment(SuiteEvent $suiteEvent)
Definition: BackendCoreEnvironment.php:72
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment
Definition: BackendCoreEnvironment.php:27
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Bootstrap
Definition: Bootstrap.php:50
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment\$localConfig
‪array $localConfig
Definition: BackendCoreEnvironment.php:32
‪TYPO3\CMS\Core\Core\Bootstrap\initializeLanguageObject
‪static Bootstrap null initializeLanguageObject()
Definition: Bootstrap.php:986