1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-17 02:24:03 +02:00

Optimize ChromePHP/FirePHP to skip header generation when they are disabled, refs #360

This commit is contained in:
Jordi Boggiano
2014-04-23 15:56:51 +02:00
parent fe226bf15b
commit 7567cecfa5
4 changed files with 21 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ class ChromePHPHandlerTest extends TestCase
protected function setUp()
{
TestChromePHPHandler::reset();
$_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; Chrome/1.0';
}
public function testHeaders()
@@ -124,6 +125,7 @@ class TestChromePHPHandler extends ChromePHPHandler
{
self::$initialized = false;
self::$overflowed = false;
self::$sendHeaders = true;
self::$json['rows'] = array();
}

View File

@@ -22,6 +22,7 @@ class FirePHPHandlerTest extends TestCase
public function setUp()
{
TestFirePHPHandler::reset();
$_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; FirePHP/1.0';
}
public function testHeaders()
@@ -79,6 +80,7 @@ class TestFirePHPHandler extends FirePHPHandler
public static function reset()
{
self::$initialized = false;
self::$sendHeaders = true;
self::$messageIndex = 1;
}