#102724Align error handler tests with changed PHPUnit behaviour
Description
PHPUnit has changed the behaviour of the error handler in
several ways, for example introducing a php attribute to
disable the PHPUnit error handler for tests dealing with
`error_get_last()` [1], throwing a exception and stopping
the script execution on `E_*_ERROR` or clearing the error
result [2] – which breaks the ability to use the native
`error_get_last()` method to test custom error handler
implementation.
Something which TYPO3 needs to do for the provided custom
error handler.
A additional change [3] to check and restore error handlers
with levels has been reverted due to issues in the laravel
world.
[1] https://github.com/sebastianbergmann/phpunit/pull/5430
2 https://github.com/sebastianbergmann/phpunit/pull/5592
3 https://github.com/sebastianbergmann/phpunit/pull/5619