Definition at line 16 of file ErrorHandlerTest.php.
◆ testHandleError()
Monolog\ErrorHandlerTest::testHandleError |
( |
| ) |
|
Definition at line 18 of file ErrorHandlerTest.php.
References $handler.
20 $logger =
new Logger(
'test', array(
$handler =
new TestHandler));
21 $errHandler =
new ErrorHandler($logger);
23 $errHandler->registerErrorHandler(array(E_USER_NOTICE =>
Logger::EMERGENCY),
false);
24 trigger_error(
'Foo', E_USER_ERROR);
25 $this->assertCount(1,
$handler->getRecords());
26 $this->assertTrue(
$handler->hasErrorRecords());
27 trigger_error(
'Foo', E_USER_NOTICE);
28 $this->assertCount(2,
$handler->getRecords());
29 $this->assertTrue(
$handler->hasEmergencyRecords());
const EMERGENCY
Urgent alert.
The documentation for this class was generated from the following file: