1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-22 12:53:27 +02:00

Remove LevelName enum in favor of a Level::getName method, fixes #1667 (#1668)

This commit is contained in:
Jordi Boggiano
2022-05-10 11:15:16 +02:00
committed by GitHub
parent d381140ca1
commit 1dacc790b9
65 changed files with 220 additions and 280 deletions

View File

@@ -12,7 +12,6 @@
namespace Monolog\Handler\Slack;
use Monolog\Level;
use Monolog\LevelName;
use Monolog\Test\TestCase;
/**
@@ -227,7 +226,7 @@ class SlackRecordTest extends TestCase
public function testAddsShortAttachmentWithoutContextAndExtra()
{
$level = Level::Error;
$levelName = LevelName::fromLevel($level)->value;
$levelName = $level->getName();
$record = new SlackRecord(null, null, true, null, true);
$data = $record->getSlackData($this->getRecord($level, 'test', ['test' => 1]));
@@ -241,7 +240,7 @@ class SlackRecordTest extends TestCase
public function testAddsShortAttachmentWithContextAndExtra()
{
$level = Level::Error;
$levelName = LevelName::fromLevel($level)->value;
$levelName = $level->getName();
$context = ['test' => 1];
$extra = ['tags' => ['web']];
$record = new SlackRecord(null, null, true, null, true, true);
@@ -274,7 +273,7 @@ class SlackRecordTest extends TestCase
public function testAddsLongAttachmentWithoutContextAndExtra()
{
$level = Level::Error;
$levelName = LevelName::fromLevel($level)->value;
$levelName = $level->getName();
$record = new SlackRecord(null, null, true, null);
$data = $record->getSlackData($this->getRecord($level, 'test', ['test' => 1]));
@@ -296,7 +295,7 @@ class SlackRecordTest extends TestCase
public function testAddsLongAttachmentWithContextAndExtra()
{
$level = Level::Error;
$levelName = LevelName::fromLevel($level)->value;
$levelName = $level->getName();
$context = ['test' => 1];
$extra = ['tags' => ['web']];
$record = new SlackRecord(null, null, true, null, false, true);