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

Add LogRecord class, drop PHP <8.1

This commit is contained in:
Jordi Boggiano
2022-02-20 14:39:51 +01:00
parent f2f66cd480
commit 22c8b19358
111 changed files with 501 additions and 361 deletions

View File

@@ -152,7 +152,7 @@ class LineFormatterTest extends \PHPUnit\Framework\TestCase
$path = str_replace('\\/', '/', json_encode(__FILE__));
$this->assertRegexp('{^\['.date('Y-m-d').'] core\.CRITICAL: foobar \{"exception":"\[object] \(RuntimeException\(code: 0\): Foo at '.preg_quote(substr($path, 1, -1)).':'.(__LINE__ - 8).'\)\n\[stacktrace]\n#0}', $message);
$this->assertMatchesRegularExpression('{^\['.date('Y-m-d').'] core\.CRITICAL: foobar \{"exception":"\[object] \(RuntimeException\(code: 0\): Foo at '.preg_quote(substr($path, 1, -1)).':'.(__LINE__ - 8).'\)\n\[stacktrace]\n#0}', $message);
}
public function testDefFormatWithPreviousException()
@@ -242,7 +242,7 @@ class LineFormatterTest extends \PHPUnit\Framework\TestCase
]
);
$this->assertRegExp('/foo bar/', $message);
$this->assertMatchesRegularExpression('/foo bar/', $message);
}
public function testFormatShouldNotStripInlineLineBreaksWhenFlagIsSet()
@@ -256,7 +256,7 @@ class LineFormatterTest extends \PHPUnit\Framework\TestCase
]
);
$this->assertRegExp('/foo\nbar/', $message);
$this->assertMatchesRegularExpression('/foo\nbar/', $message);
}
}