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

Public Member Functions

 errorHandlerLogsCorrectly (int $levelsToHandle, int $levelsToThrow, int $levelToTrigger, string $message, string $file, int $line, ?bool $expectedReturn, ?string $deprecationsLogMessage, ?string $deprecationsLogLevel, ?string $errorsLogMessage, ?string $errorsLogLevel, ?string $exceptionMessage)
 

Static Public Member Functions

static errorTests ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

ErrorHandlerInterface $subject
 
LoggerInterface $unusedLogger
 
LoggerInterface $trackingLogger
 
const DEFAULT_ERROR_HANDLER_LEVELS = E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR)
 
const DEFAULT_EXCEPTIONAL_ERROR_LEVELS = E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR | E_DEPRECATED | E_USER_DEPRECATED | E_WARNING | E_USER_ERROR | E_USER_NOTICE | E_USER_WARNING)
 
bool $resetSingletonInstances = true
 

Detailed Description

Testcase for the ErrorHandler class.

Definition at line 36 of file ErrorHandlerTest.php.

Member Function Documentation

◆ errorHandlerLogsCorrectly()

TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::errorHandlerLogsCorrectly ( int  $levelsToHandle,
int  $levelsToThrow,
int  $levelToTrigger,
string  $message,
string  $file,
int  $line,
?bool  $expectedReturn,
?string  $deprecationsLogMessage,
?string  $deprecationsLogLevel,
?string  $errorsLogMessage,
?string  $errorsLogLevel,
?string  $exceptionMessage 
)

disabled until the new channel is in place if ($errorsLogMessage) { self::assertEquals($errorsLogMessage, $logManager->getLogger('TYPO3.CMS.php_errors')->records[0]['message']); self::assertEquals($errorsLogLevel, $logManager->getLogger('TYPO3.CMS.php_errors')->records[0]['level']); }

Definition at line 73 of file ErrorHandlerTest.php.

References TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest\$subject, TYPO3\CMS\Core\Error\ErrorHandlerInterface\handleError(), and TYPO3\CMS\Core\Error\ErrorHandlerInterface\setExceptionalErrors().

◆ errorTests()

◆ setUp()

TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::setUp ( )
protected

Sets up this test case.

Definition at line 52 of file ErrorHandlerTest.php.

Member Data Documentation

◆ $resetSingletonInstances

bool TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::$resetSingletonInstances = true
protected

Definition at line 47 of file ErrorHandlerTest.php.

◆ $subject

ErrorHandlerInterface TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::$subject
protected

◆ $trackingLogger

LoggerInterface TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::$trackingLogger
protected

Definition at line 41 of file ErrorHandlerTest.php.

◆ $unusedLogger

LoggerInterface TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::$unusedLogger
protected

Definition at line 40 of file ErrorHandlerTest.php.

◆ DEFAULT_ERROR_HANDLER_LEVELS

const TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::DEFAULT_ERROR_HANDLER_LEVELS = E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR)
protected

◆ DEFAULT_EXCEPTIONAL_ERROR_LEVELS

const TYPO3\CMS\Core\Tests\Unit\Error\ErrorHandlerTest::DEFAULT_EXCEPTIONAL_ERROR_LEVELS = E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR | E_DEPRECATED | E_USER_DEPRECATED | E_WARNING | E_USER_ERROR | E_USER_NOTICE | E_USER_WARNING)
protected