From f3b6f92d92e1c3a1d770da2352560e383a8218e7 Mon Sep 17 00:00:00 2001 From: artarts36 Date: Sat, 27 May 2023 02:16:03 +0300 Subject: [PATCH] fix test --- tests/Unit/Domain/Note/ExceptionNoteTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Domain/Note/ExceptionNoteTest.php b/tests/Unit/Domain/Note/ExceptionNoteTest.php index e89e542af..56fc2c023 100644 --- a/tests/Unit/Domain/Note/ExceptionNoteTest.php +++ b/tests/Unit/Domain/Note/ExceptionNoteTest.php @@ -53,11 +53,15 @@ public function testWithSeverity(): void */ public function testJsonSerialize(): void { - $note = new ExceptionNote(new \Exception('exception msg')); + $note = new ExceptionNote($e = new \Exception('exception msg')); self::assertEquals( [ - 'description' => 'exception msg (exception Exception on /Users/avukrainskiy/PhpstormProjects/php-merge-request-linter/tests/Unit/Domain/Note/ExceptionNoteTest.php#56)', + 'description' => sprintf( + 'exception msg (exception Exception on %s#%s)', + $e->getFile(), + $e->getLine(), + ), 'severity' => NoteSeverity::Fatal->value, ], $note->jsonSerialize(),