1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 20:57:36 +02:00

Fix tests usage

This commit is contained in:
Jordi Boggiano
2023-10-27 16:09:14 +02:00
parent 1feb860c33
commit 5d317e2c6f

View File

@@ -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);