From 49ee769dd51cabab4cc2831cb985200f2a16b625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Tue, 17 Sep 2024 16:20:32 +0200 Subject: [PATCH] Return null when expected --- tests/SpecTests/DocumentsMatchConstraint.php | 2 ++ tests/UnifiedSpecTests/Constraint/Matches.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/SpecTests/DocumentsMatchConstraint.php b/tests/SpecTests/DocumentsMatchConstraint.php index 03f905bd3..e8d4d0de0 100644 --- a/tests/SpecTests/DocumentsMatchConstraint.php +++ b/tests/SpecTests/DocumentsMatchConstraint.php @@ -97,6 +97,8 @@ public function evaluate($other, string $description = '', bool $returnResult = if (! $success) { $this->fail($other, $description, $this->lastFailure); } + + return null; } /** @param string|BSONArray[] $expectedType */ diff --git a/tests/UnifiedSpecTests/Constraint/Matches.php b/tests/UnifiedSpecTests/Constraint/Matches.php index eb963aca9..4346b6dc8 100644 --- a/tests/UnifiedSpecTests/Constraint/Matches.php +++ b/tests/UnifiedSpecTests/Constraint/Matches.php @@ -101,6 +101,8 @@ public function evaluate($other, $description = '', $returnResult = false): ?boo if (! $success) { $this->fail($other, $description, $this->lastFailure); } + + return null; } private function assertEquals($expected, $actual, string $keyPath): void