‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest:

Public Member Functions

 tearDown ()
 
 handleErrorFetchesDeprecations ()
 
 handleErrorOnlyHandlesRegisteredErrorLevels ()
 

Protected Attributes

bool $initializeDatabase = false
 
array $configurationToUseInTestInstance
 

Detailed Description

Definition at line 27 of file ErrorHandlerTest.php.

Member Function Documentation

◆ handleErrorFetchesDeprecations()

TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest::handleErrorFetchesDeprecations ( )

Definition at line 45 of file ErrorHandlerTest.php.

◆ handleErrorOnlyHandlesRegisteredErrorLevels()

TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest::handleErrorOnlyHandlesRegisteredErrorLevels ( )

This test checks the following:

Normally the core error handler is registered with an error level other than E_ALL to not handle E_NOTICE errors for instance.

As PHP allows to stack error handlers with different error levels it is possible to register an error handler with an E_ALL error level. As that custom handler does not know the error level of it's previously registered handler, it has no choice but to forward all occurring errors to the previous handler by calling \TYPO3\CMS\Core\Error\ErrorHandler::handleError via call_user_func. This leads to \TYPO3\CMS\Core\Error\ErrorHandler::handleError handling errors it was not registered for. Thus, there needs to be a check if \TYPO3\CMS\Core\Error\ErrorHandler should handle the incoming error.

Definition at line 72 of file ErrorHandlerTest.php.

◆ tearDown()

TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest::tearDown ( )

Definition at line 37 of file ErrorHandlerTest.php.

Member Data Documentation

◆ $configurationToUseInTestInstance

array TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest::$configurationToUseInTestInstance
protected
Initial value:
= [
'SYS' => [
'errorHandler' => ErrorHandler::class,
],
]

Definition at line 31 of file ErrorHandlerTest.php.

◆ $initializeDatabase

bool TYPO3\CMS\Core\Tests\Functional\Error\ErrorHandlerTest::$initializeDatabase = false
protected

Definition at line 29 of file ErrorHandlerTest.php.