Skip to content

Commit

Permalink
clone log collection for assert and filter
Browse files Browse the repository at this point in the history
  • Loading branch information
vstelmakh committed Feb 22, 2025
1 parent 47717e8 commit 0ba5a14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TestLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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);
}
}

0 comments on commit 0ba5a14

Please sign in to comment.