Browse Source

Fix tests usage

Jordi Boggiano 2 years ago
parent
commit
5d317e2c6f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tests/Monolog/Formatter/LineFormatterTest.php

+ 2 - 1
tests/Monolog/Formatter/LineFormatterTest.php

@@ -282,7 +282,8 @@ class LineFormatterTest extends TestCase
      */
     public function testMaxLevelNameLength(?int $maxLength, Level $logLevel, string $expectedLevelName): void
     {
-        $formatter = new LineFormatter(maxLevelNameLength: $maxLength);
+        $formatter = new LineFormatter();
+        $formatter->setMaxLevelNameLength($maxLength);
         $message = $formatter->format($this->getRecord(message: "foo\nbar", level: $logLevel));
 
         $this->assertStringContainsString("test.$expectedLevelName:", $message);