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

Convert level/levelName to enums (#1656)

This commit is contained in:
Jordi Boggiano
2022-04-19 21:49:03 +02:00
committed by GitHub
parent 248673e858
commit 2d006a8472
138 changed files with 1297 additions and 1216 deletions

View File

@@ -13,7 +13,7 @@ namespace Monolog\Handler;
use Gelf\Message;
use Monolog\Test\TestCase;
use Monolog\Logger;
use Monolog\Level;
use Monolog\Formatter\GelfMessageFormatter;
class GelfHandlerTest extends TestCase
@@ -51,7 +51,7 @@ class GelfHandlerTest extends TestCase
public function testDebug()
{
$record = $this->getRecord(Logger::DEBUG, "A test debug message");
$record = $this->getRecord(Level::Debug, "A test debug message");
$expectedMessage = new Message();
$expectedMessage
->setLevel(7)
@@ -72,7 +72,7 @@ class GelfHandlerTest extends TestCase
public function testWarning()
{
$record = $this->getRecord(Logger::WARNING, "A test warning message");
$record = $this->getRecord(Level::Warning, "A test warning message");
$expectedMessage = new Message();
$expectedMessage
->setLevel(4)
@@ -94,7 +94,7 @@ class GelfHandlerTest extends TestCase
public function testInjectedGelfMessageFormatter()
{
$record = $this->getRecord(
Logger::WARNING,
Level::Warning,
"A test warning message",
extra: ['blarg' => 'yep'],
context: ['from' => 'logger'],