From 0ba5a148c65d0c45839838f5805434e375154869 Mon Sep 17 00:00:00 2001 From: Volodymyr Stelmakh Date: Sat, 22 Feb 2025 12:42:41 +0100 Subject: [PATCH] clone log collection for assert and filter --- src/TestLogger.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TestLogger.php b/src/TestLogger.php index 94f7812..d4a05ca 100644 --- a/src/TestLogger.php +++ b/src/TestLogger.php @@ -49,7 +49,7 @@ public function getLogs(): array */ public function assert(string $message = ''): Assert { - return new Assert($this->logs, $message); + return new Assert(clone $this->logs, $message); } /** @@ -59,6 +59,6 @@ public function assert(string $message = ''): Assert */ public function filter(): Filter { - return new Filter($this->logs); + return new Filter(clone $this->logs); } }