From cc911f5858e74612c5646df8bf9f86814be999bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20H=C3=A4u=C3=9Fler?= Date: Tue, 18 Jun 2024 07:54:17 +0200 Subject: [PATCH] [BUGFIX] Use compare function for array intersection --- tests/src/ConfigTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/src/ConfigTest.php b/tests/src/ConfigTest.php index b60421d..fadb23f 100644 --- a/tests/src/ConfigTest.php +++ b/tests/src/ConfigTest.php @@ -30,7 +30,7 @@ use PHPUnit\Framework; use Symfony\Component\Finder; -use function array_intersect_assoc; +use function array_uintersect_assoc; use function class_exists; /** @@ -144,6 +144,13 @@ public static function withRulesAddsRuleDataProvider(): Generator */ private function assertRulesAreConfigured(array $rules): void { - self::assertSame($rules, array_intersect_assoc($this->subject->getRules(), $rules)); + self::assertSame( + $rules, + array_uintersect_assoc( + $this->subject->getRules(), + $rules, + static fn (mixed $a, mixed $b) => $a === $b ? 0 : -1, + ), + ); } }