[TASK] Avoid setUpBackendUserFromFixture() in functionals
The testing-framework method setUpBackendUserFromFixture() is kinda flawed since it does two things at once: It creates db records and creates global state. This is unfortunate in various cases, especially when db snapshoting is used. Additionally, it relies on a class property which defaults to a fixture file delivered by testing-framework in XML format. We want to get rid of the .xml fixtures, and we don't want that the testing-framework delivers default fixtures. The patch adapts all usages of the property and of method setUpBackendUserFromFixture() by splitting it into two calls to first insert a local extension fixture .csv file and to then call the backend user init helper method. This finishes the removal of .xml fixture uses in the core. $ composer req --dev typo3/testing-framework:dev-main Change-Id: I32a5c43a6c8176a9e9182d08e08b42b5ff279634 Resolves: #97928 Related: #96856 Releases: main Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75168 Tested-by:Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 5 deletionsBuild/phpstan/phpstan-baseline.neon
- composer.lock 4 additions, 4 deletionscomposer.lock
- typo3/sysext/backend/Tests/Functional/Backend/Shortcut/ShortcutRepositoryTest.php 2 additions, 2 deletions...ts/Functional/Backend/Shortcut/ShortcutRepositoryTest.php
- typo3/sysext/backend/Tests/Functional/Clipboard/ClipboardTest.php 2 additions, 1 deletion...sext/backend/Tests/Functional/Clipboard/ClipboardTest.php
- typo3/sysext/backend/Tests/Functional/Controller/BackendControllerTest.php 2 additions, 1 deletion...end/Tests/Functional/Controller/BackendControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/EditDocumentControllerTest.php 2 additions, 2 deletions...ests/Functional/Controller/EditDocumentControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php 2 additions, 2 deletions...ts/Functional/Controller/FormInlineAjaxControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaAjaxControllerTest.php 2 additions, 3 deletions...end/Tests/Functional/Controller/MfaAjaxControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaConfigurationControllerTest.php 2 additions, 1 deletion.../Functional/Controller/MfaConfigurationControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaControllerTest.php 2 additions, 1 deletion...backend/Tests/Functional/Controller/MfaControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/MfaSetupControllerTest.php 2 additions, 1 deletion...nd/Tests/Functional/Controller/MfaSetupControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/Page/Fixtures/be_users.csv 6 additions, 0 deletions...nd/Tests/Functional/Controller/Page/Fixtures/be_users.csv
- typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php 3 additions, 6 deletions...d/Tests/Functional/Controller/Page/TreeControllerTest.php
- typo3/sysext/backend/Tests/Functional/Controller/ShortcutControllerTest.php 2 additions, 2 deletions...nd/Tests/Functional/Controller/ShortcutControllerTest.php
- typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php 2 additions, 2 deletions...in/Repository/Localization/LocalizationRepositoryTest.php
- typo3/sysext/backend/Tests/Functional/Fixtures/be_users.csv 4 additions, 0 deletionstypo3/sysext/backend/Tests/Functional/Fixtures/be_users.csv
- typo3/sysext/backend/Tests/Functional/Fixtures/be_users_mfa.csv 7 additions, 0 deletions...sysext/backend/Tests/Functional/Fixtures/be_users_mfa.csv
- typo3/sysext/backend/Tests/Functional/Form/FormDataProvider/TcaCategoryTest.php 2 additions, 1 deletion...ests/Functional/Form/FormDataProvider/TcaCategoryTest.php
- typo3/sysext/backend/Tests/Functional/Form/FormDataProvider/TcaGroupTest.php 2 additions, 1 deletion...d/Tests/Functional/Form/FormDataProvider/TcaGroupTest.php
- typo3/sysext/backend/Tests/Functional/Middleware/BackendModuleValidatorTest.php 2 additions, 1 deletion...ests/Functional/Middleware/BackendModuleValidatorTest.php
Please register or sign in to comment