ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Monolog\Handler\AbstractProcessingHandlerTest Class Reference
+ Inheritance diagram for Monolog\Handler\AbstractProcessingHandlerTest:
+ Collaboration diagram for Monolog\Handler\AbstractProcessingHandlerTest:

Public Member Functions

 testHandleLowerLevelMessage ()
 Monolog::handle More...
 
 testHandleBubbling ()
 Monolog::handle More...
 
 testHandleNotBubbling ()
 Monolog::handle More...
 
 testHandleIsFalseWhenNotHandled ()
 Monolog::handle More...
 
 testProcessRecord ()
 Monolog::processRecord More...
 

Additional Inherited Members

- Protected Member Functions inherited from Monolog\TestCase
 getRecord ($level=Logger::WARNING, $message='test', $context=array())
 
 getMultipleRecords ()
 
 getIdentityFormatter ()
 

Detailed Description

Definition at line 18 of file AbstractProcessingHandlerTest.php.

Member Function Documentation

◆ testHandleBubbling()

Monolog\Handler\AbstractProcessingHandlerTest::testHandleBubbling ( )

Monolog::handle

Definition at line 32 of file AbstractProcessingHandlerTest.php.

References array, and Monolog\Logger\DEBUG.

33  {
34  $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, true));
35  $this->assertFalse($handler->handle($this->getRecord()));
36  }
const DEBUG
Detailed debug information.
Definition: Logger.php:32
Create styles array
The data for the language used.

◆ testHandleIsFalseWhenNotHandled()

Monolog\Handler\AbstractProcessingHandlerTest::testHandleIsFalseWhenNotHandled ( )

Monolog::handle

Definition at line 50 of file AbstractProcessingHandlerTest.php.

References array, Monolog\Logger\DEBUG, and Monolog\Logger\WARNING.

51  {
52  $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, false));
53  $this->assertTrue($handler->handle($this->getRecord()));
54  $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
55  }
const DEBUG
Detailed debug information.
Definition: Logger.php:32
const WARNING
Exceptional occurrences that are not errors.
Definition: Logger.php:52
Create styles array
The data for the language used.

◆ testHandleLowerLevelMessage()

Monolog\Handler\AbstractProcessingHandlerTest::testHandleLowerLevelMessage ( )

Monolog::handle

Definition at line 23 of file AbstractProcessingHandlerTest.php.

References array, Monolog\Logger\DEBUG, and Monolog\Logger\WARNING.

24  {
25  $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, true));
26  $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG)));
27  }
const DEBUG
Detailed debug information.
Definition: Logger.php:32
const WARNING
Exceptional occurrences that are not errors.
Definition: Logger.php:52
Create styles array
The data for the language used.

◆ testHandleNotBubbling()

Monolog\Handler\AbstractProcessingHandlerTest::testHandleNotBubbling ( )

Monolog::handle

Definition at line 41 of file AbstractProcessingHandlerTest.php.

References array, and Monolog\Logger\DEBUG.

42  {
43  $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, false));
44  $this->assertTrue($handler->handle($this->getRecord()));
45  }
const DEBUG
Detailed debug information.
Definition: Logger.php:32
Create styles array
The data for the language used.

◆ testProcessRecord()

Monolog\Handler\AbstractProcessingHandlerTest::testProcessRecord ( )

Monolog::processRecord

Definition at line 60 of file AbstractProcessingHandlerTest.php.

References array, and Monolog\TestCase\getRecord().

61  {
62  $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler');
63  $handler->pushProcessor(new WebProcessor(array(
64  'REQUEST_URI' => '',
65  'REQUEST_METHOD' => '',
66  'REMOTE_ADDR' => '',
67  'SERVER_NAME' => '',
68  'UNIQUE_ID' => '',
69  )));
70  $handledRecord = null;
71  $handler->expects($this->once())
72  ->method('write')
73  ->will($this->returnCallback(function ($record) use (&$handledRecord) {
74  $handledRecord = $record;
75  }))
76  ;
77  $handler->handle($this->getRecord());
78  $this->assertEquals(6, count($handledRecord['extra']));
79  }
getRecord($level=Logger::WARNING, $message='test', $context=array())
Definition: TestCase.php:19
Create styles array
The data for the language used.
+ Here is the call graph for this function:

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