public function testConcurrentHandlers()
 {
     $handler = new TestChromePHPHandler();
     $handler->setFormatter($this->getIdentityFormatter());
     $handler->handle($this->getRecord(Logger::DEBUG));
     $handler->handle($this->getRecord(Logger::WARNING));
     $handler2 = new TestChromePHPHandler();
     $handler2->setFormatter($this->getIdentityFormatter());
     $handler2->handle($this->getRecord(Logger::DEBUG));
     $handler2->handle($this->getRecord(Logger::WARNING));
     $expected = array('X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array('version' => ChromePHPHandler::VERSION, 'columns' => array('label', 'log', 'backtrace', 'type'), 'rows' => array('Test', 'Test', 'Test', 'Test'), 'request_uri' => '')))));
     $this->assertEquals($expected, $handler2->getHeaders());
 }
Beispiel #2
0
 protected function setUp()
 {
     TestChromePHPHandler::reset();
     $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; Chrome/1.0';
 }