1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-27 06:54:38 +02:00

Let indexed arrays to support inline linebreaks in LineFormatter (#1818)

This commit is contained in:
dong
2023-10-27 07:31:42 -05:00
committed by GitHub
parent 5be54eaa1e
commit 8813064010
2 changed files with 3 additions and 1 deletions

View File

@@ -147,6 +147,8 @@ class LineFormatterTest extends TestCase
$formatter->allowInlineLineBreaks();
self::assertSame('{"test":"foo'."\n".'bar\\\\name-with-n"}', $formatter->stringify(["test" => "foo\nbar\\name-with-n"]));
self::assertSame('["indexed'."\n".'arrays'."\n".'without'."\n".'key","foo'."\n".'bar\\\\name-with-n"]', $formatter->stringify(["indexed\narrays\nwithout\nkey", "foo\nbar\\name-with-n"]));
self::assertSame('[{"first":"multi-dimensional'."\n".'arrays"},{"second":"foo'."\n".'bar\\\\name-with-n"}]', $formatter->stringify([["first" => "multi-dimensional\narrays"], ["second" => "foo\nbar\\name-with-n"]]));
}
public function testDefFormatWithExceptionAndStacktraceParserFull()