‪TYPO3CMS  10.4
BackendCoreEnvironment.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\Event\SuiteEvent;
21 use Symfony\Component\Mailer\Transport\NullTransport;
23 use TYPO3\CMS\Styleguide\TcaDataGenerator\Generator;
24 use TYPO3\TestingFramework\Core\Acceptance\Extension\BackendEnvironment;
25 
29 class ‪BackendCoreEnvironment extends BackendEnvironment
30 {
36  protected ‪$localConfig = [
37  'coreExtensionsToLoad' => [
38  'core',
39  'beuser',
40  'extbase',
41  'fluid',
42  'filelist',
43  'extensionmanager',
44  'setup',
45  'backend',
46  'about',
47  'belog',
48  'install',
49  'frontend',
50  'recordlist',
51  'redirects',
52  'reports',
53  'sys_note',
54  'scheduler',
55  'tstemplate',
56  ],
57  'testExtensionsToLoad' => [
58  'typo3conf/ext/styleguide'
59  ],
60  'xmlDatabaseFixtures' => [
61  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/be_users.xml',
62  'typo3/sysext/core/Tests/Acceptance/Fixtures/be_sessions.xml',
63  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/be_groups.xml',
64  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/sys_category.xml',
65  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_extension.xml',
66  'PACKAGE:typo3/testing-framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_repository.xml',
67  'typo3/sysext/core/Tests/Acceptance/Fixtures/pages.xml',
68  ],
69  'configurationToUseInTestInstance' => [
70  'MAIL' => [
71  'transport' => NullTransport::class
72  ]
73  ]
74  ];
75 
81  public function ‪bootstrapTypo3Environment(SuiteEvent $suiteEvent)
82  {
83  parent::bootstrapTypo3Environment($suiteEvent);
84  // styleguide generator uses DataHandler for some parts. DataHandler needs an initialized BE user
85  // with admin right and the live workspace.
87  ‪$GLOBALS['BE_USER']->user['admin'] = 1;
88  ‪$GLOBALS['BE_USER']->user['uid'] = 1;
89  ‪$GLOBALS['BE_USER']->workspace = 0;
91 
92  $styleguideGenerator = new Generator();
93  $styleguideGenerator->create();
94  }
95 }
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension
Definition: BackendCoreEnvironment.php:18
‪TYPO3\CMS\Core\Core\Bootstrap\initializeLanguageObject
‪static initializeLanguageObject()
Definition: Bootstrap.php:617
‪TYPO3\CMS\Core\Core\Bootstrap\initializeBackendUser
‪static initializeBackendUser($className=BackendUserAuthentication::class)
Definition: Bootstrap.php:591
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment\bootstrapTypo3Environment
‪bootstrapTypo3Environment(SuiteEvent $suiteEvent)
Definition: BackendCoreEnvironment.php:80
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment
Definition: BackendCoreEnvironment.php:30
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Core\Bootstrap
Definition: Bootstrap.php:66
‪TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment\$localConfig
‪array $localConfig
Definition: BackendCoreEnvironment.php:35