[BUGFIX] Run tests with configured error reporting in PHPunit
SystemEnvironmentBuilder calls error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED)); which in turn is called on every test to setup the environment. This basically enforces this exact error reporting and does not allow to configure the error reporting in phpunit.xml AT ALL. Until TYPO3 v9, this was covered in each BaseTestCase in setUpBeforeClass() to re-add E_NOTICE to make all tests run without notice. The functionality in SystemEnvironmentBuilder was added in TYPO3 v6.0 while refactoring TYPO3's Bootstrap to ensure that no notices in ext_localconf.php or ext_tables.php were breaking the output. However, nowadays, TYPO3's error reporting is set up directly after LocalConfiguration.php inclusion, making this logic obsolete. The functionality is therefore moved to the Bootstrap at a later point, which is called for Functional and Acceptance Tests. Resolves: #90125 Releases: master Change-Id: I8d6348ffbf6622c03abecedc1cb0ce286ba1044c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926 Reviewed-by:Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Classes/Charset/CharsetConverter.php 4 additions, 0 deletionstypo3/sysext/core/Classes/Charset/CharsetConverter.php
- typo3/sysext/core/Classes/Core/Bootstrap.php 20 additions, 0 deletionstypo3/sysext/core/Classes/Core/Bootstrap.php
- typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php 0 additions, 15 deletionstypo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
- typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php 1 addition, 37 deletions...ext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php
Please register or sign in to comment