[BUGFIX] Avoid dirty `SilentConfigurationUpgradeServiceTest` test setup
With #100407 the `SilentConfigurationUpgradeServiceTest` has been promoted from a unit test to a functional test to avoid a mocking party. Tests in this test cases write "test configuration" to the test instances `LocalConfiguration.php` file. For this the update method `ConfigurationManager->updateLocalConfiguration` is used to set the test configuration upon the generated test-instance config. Secondly, the `SilentConfigurationUpgradeService` is used to check for changed configurations. This service also updates the config, even if not reloading it. Reload would be done for the next test. These two facts together leads to dirty LocalConfiguration.php for a test. Deterministic setup per test is not guaranteed, because the configuration is not properly cleaned up after a test. This change stores the functional test instances configuration in `setUp()` and restores it in `tearDown()`, using the write method `ConfigurationManager->writeLocalConfiguration()`. This resets `LocalConfiguration.php` to the state which has been created by the testing-framework. The correct expectation, that no change happened, is set for `versionNumberInFilenameSetToTrueStaysUntouched`. Resolves: #101075 Related: #100407 Releases: main, 12.4 Change-Id: I18dd80fee04cc27cbb709cfb1c7494dc975edc42 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79392 Tested-by:Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com>
Please register or sign in to comment