ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Monolog\Handler\FirePHPHandlerTest Class Reference

@covers Monolog\Handler\FirePHPHandler More...

+ Inheritance diagram for Monolog\Handler\FirePHPHandlerTest:
+ Collaboration diagram for Monolog\Handler\FirePHPHandlerTest:

Public Member Functions

 setUp ()
 
 testHeaders ()
 
 testConcurrentHandlers ()
 

Additional Inherited Members

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

Detailed Description

@covers Monolog\Handler\FirePHPHandler

Definition at line 20 of file FirePHPHandlerTest.php.

Member Function Documentation

◆ setUp()

Monolog\Handler\FirePHPHandlerTest::setUp ( )

Definition at line 22 of file FirePHPHandlerTest.php.

23 {
25 $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; FirePHP/1.0';
26 }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_SERVER, and Monolog\Handler\TestFirePHPHandler\reset().

+ Here is the call graph for this function:

◆ testConcurrentHandlers()

Monolog\Handler\FirePHPHandlerTest::testConcurrentHandlers ( )

Definition at line 46 of file FirePHPHandlerTest.php.

47 {
48 $handler = new TestFirePHPHandler;
49 $handler->setFormatter($this->getIdentityFormatter());
50 $handler->handle($this->getRecord(Logger::DEBUG));
51 $handler->handle($this->getRecord(Logger::WARNING));
52
53 $handler2 = new TestFirePHPHandler;
54 $handler2->setFormatter($this->getIdentityFormatter());
55 $handler2->handle($this->getRecord(Logger::DEBUG));
56 $handler2->handle($this->getRecord(Logger::WARNING));
57
58 $expected = array(
59 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2',
60 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1',
61 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3',
62 'X-Wf-1-1-1-1' => 'test',
63 'X-Wf-1-1-1-2' => 'test',
64 );
65
66 $expected2 = array(
67 'X-Wf-1-1-1-3' => 'test',
68 'X-Wf-1-1-1-4' => 'test',
69 );
70
71 $this->assertEquals($expected, $handler->getHeaders());
72 $this->assertEquals($expected2, $handler2->getHeaders());
73 }
const WARNING
Exceptional occurrences that are not errors.
Definition: Logger.php:52
const DEBUG
Detailed debug information.
Definition: Logger.php:32
getRecord($level=Logger::WARNING, $message='test', $context=array())
Definition: TestCase.php:19

References Monolog\Logger\DEBUG, Monolog\TestCase\getIdentityFormatter(), Monolog\TestCase\getRecord(), Monolog\Handler\AbstractHandler\setFormatter(), and Monolog\Logger\WARNING.

+ Here is the call graph for this function:

◆ testHeaders()

Monolog\Handler\FirePHPHandlerTest::testHeaders ( )

Definition at line 28 of file FirePHPHandlerTest.php.

29 {
30 $handler = new TestFirePHPHandler;
31 $handler->setFormatter($this->getIdentityFormatter());
32 $handler->handle($this->getRecord(Logger::DEBUG));
33 $handler->handle($this->getRecord(Logger::WARNING));
34
35 $expected = array(
36 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2',
37 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1',
38 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3',
39 'X-Wf-1-1-1-1' => 'test',
40 'X-Wf-1-1-1-2' => 'test',
41 );
42
43 $this->assertEquals($expected, $handler->getHeaders());
44 }

References Monolog\Logger\DEBUG, Monolog\TestCase\getIdentityFormatter(), Monolog\TestCase\getRecord(), Monolog\Handler\AbstractHandler\setFormatter(), and Monolog\Logger\WARNING.

+ Here is the call graph for this function:

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