Bug #90125

Tests do not cover notices in Core

Added by Benni Mack about 1 month ago. Updated 11 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Tests
Start date:
2020-01-16
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

SystemEnvironmentBuilder resets error reporting from tests - that's bad!

Associated revisions

Revision 9a3f936b (diff)
Added by Benni Mack 11 days ago

[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 <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Benni Mack <>
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#2 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#3 Updated by Gerrit Code Review 26 days ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#4 Updated by Gerrit Code Review 26 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#5 Updated by Gerrit Code Review 25 days ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#6 Updated by Gerrit Code Review 12 days ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#7 Updated by Gerrit Code Review 12 days ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62926

#8 Updated by Benni Mack 11 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF