From c6221eb4fe29ddf8a09f7fdb4277758716269bd6 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Fri, 15 Nov 2024 17:36:55 +0200 Subject: Improve tests. --- tests/FormatTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/FormatTest.php') diff --git a/tests/FormatTest.php b/tests/FormatTest.php index 06f30a3..4d9dde0 100644 --- a/tests/FormatTest.php +++ b/tests/FormatTest.php @@ -43,6 +43,21 @@ class FormatTest extends MockeryTestCase $this->assertEquals($expectedJson, $serializedMessage); } + public function testJsonFails(): void + { + $message = new Message( + level: Level::Info, + trace: debug_backtrace()[0], + context: NAN, + ); + + $format = Format::JSON; + $serializedMessage = $format->serialize($message); + $expectedJson = ''; + + $this->assertEquals($expectedJson, $serializedMessage); + } + public function testIntelliJ(): void { $message = new Message( -- cgit v1.2.3