1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-04 04:07:39 +02:00

More testing coverage

This commit is contained in:
Jordi Boggiano
2011-06-29 21:32:02 +02:00
parent 7a56a1c73f
commit 66c1cc05a8
5 changed files with 87 additions and 12 deletions

View File

@@ -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']));
}
}