mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 22:26:41 +02:00
Add support for PSR-3 levels to all public APIs accepting levels, fixes #421
This commit is contained in:
@@ -62,6 +62,17 @@ class AbstractHandlerTest extends TestCase
|
||||
$this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Handler\AbstractHandler::__construct
|
||||
*/
|
||||
public function testHandlesPsrStyleLevels()
|
||||
{
|
||||
$handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array('warning', false));
|
||||
$this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG)));
|
||||
$handler->setLevel('debug');
|
||||
$this->assertTrue($handler->isHandling($this->getRecord(Logger::DEBUG)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Monolog\Handler\AbstractHandler::getFormatter
|
||||
* @covers Monolog\Handler\AbstractHandler::getDefaultFormatter
|
||||
|
Reference in New Issue
Block a user