ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Monolog\ErrorHandlerTest Class Reference
+ Inheritance diagram for Monolog\ErrorHandlerTest:
+ Collaboration diagram for Monolog\ErrorHandlerTest:

Public Member Functions

 testHandleError ()
 

Detailed Description

Definition at line 16 of file ErrorHandlerTest.php.

Member Function Documentation

◆ testHandleError()

Monolog\ErrorHandlerTest::testHandleError ( )

Definition at line 18 of file ErrorHandlerTest.php.

References $handler.

19  {
20  $logger = new Logger('test', array($handler = new TestHandler));
21  $errHandler = new ErrorHandler($logger);
22 
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());
30  }
const EMERGENCY
Urgent alert.
Definition: Logger.php:78
$handler

The documentation for this class was generated from the following file: