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

Add support for PSR-3 levels to all public APIs accepting levels, fixes #421

This commit is contained in:
Jordi Boggiano
2014-09-30 13:59:45 +01:00
parent 43ca6dc06b
commit feb19af2d4
13 changed files with 91 additions and 15 deletions

View File

@@ -13,7 +13,6 @@ namespace Monolog\Handler;
use Monolog\TestCase;
use Monolog\Logger;
use Psr\Log\LogLevel;
class NewRelicHandlerTest extends TestCase
{
@@ -85,7 +84,7 @@ class NewRelicHandlerTest extends TestCase
public function testTheAppNameCanBeInjectedFromtheConstructor()
{
$handler = new StubNewRelicHandler(LogLevel::ALERT, false, 'myAppName');
$handler = new StubNewRelicHandler(Logger::DEBUG, false, 'myAppName');
$handler->handle($this->getRecord(Logger::ERROR, 'log message'));
$this->assertEquals('myAppName', self::$appname);
@@ -93,7 +92,7 @@ class NewRelicHandlerTest extends TestCase
public function testTheAppNameCanBeOverriddenFromEachLog()
{
$handler = new StubNewRelicHandler(LogLevel::ALERT, false, 'myAppName');
$handler = new StubNewRelicHandler(Logger::DEBUG, false, 'myAppName');
$handler->handle($this->getRecord(Logger::ERROR, 'log message', array('appname' => 'logAppName')));
$this->assertEquals('logAppName', self::$appname);