diff options
Diffstat (limited to 'tests/Monolog/Handler/AbstractProcessingHandlerTest.php')
-rw-r--r-- | tests/Monolog/Handler/AbstractProcessingHandlerTest.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/tests/Monolog/Handler/AbstractProcessingHandlerTest.php index f2b4142..31a4538 100644 --- a/tests/Monolog/Handler/AbstractProcessingHandlerTest.php +++ b/tests/Monolog/Handler/AbstractProcessingHandlerTest.php @@ -13,6 +13,7 @@ namespace Monolog\Handler; use Monolog\TestCase; use Monolog\Logger; +use Monolog\Processor\WebProcessor; class AbstractProcessingHandlerTest extends TestCase { @@ -52,4 +53,20 @@ class AbstractProcessingHandlerTest extends TestCase $this->assertTrue($handler->handle($this->getRecord())); $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); } + + /** + * @covers Monolog\Handler\AbstractProcessingHandler::processRecord + */ + public function testProcessRecord() + { + $handler = new TestHandler(); + $handler->pushProcessor(new WebProcessor(array( + 'REQUEST_URI' => '', + 'REQUEST_METHOD' => '', + 'REMOTE_ADDR' => '', + ))); + $handler->handle($this->getRecord()); + list($record) = $handler->getRecords(); + $this->assertEquals(3, count($record['extra'])); + } } |