chore: moves to phpunit 13.2

This commit is contained in:
nuno maduro
2026-07-07 13:40:02 +01:00
parent 72ab506d7b
commit 33e3bf2888
9 changed files with 81 additions and 27 deletions
+2 -2
View File
@@ -576,7 +576,7 @@ final readonly class OppositeExpectation
return Targeted::make(
$original,
fn (ObjectDescription $object): bool => array_all($traits, fn (string $trait): bool => ! (isset($object->reflectionClass) && in_array($trait, $object->reflectionClass->getTraitNames(), true))),
fn (ObjectDescription $object): bool => array_all($traits, fn (string $trait): bool => ! isset($object->reflectionClass) || ! in_array($trait, $object->reflectionClass->getTraitNames(), true)),
"not to use traits '".implode("', '", $traits)."'",
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
);
@@ -596,7 +596,7 @@ final readonly class OppositeExpectation
return Targeted::make(
$original,
fn (ObjectDescription $object): bool => array_all($interfaces, fn (string $interface): bool => ! (isset($object->reflectionClass) && $object->reflectionClass->implementsInterface($interface))),
fn (ObjectDescription $object): bool => array_all($interfaces, fn (string $interface): bool => ! isset($object->reflectionClass) || ! $object->reflectionClass->implementsInterface($interface)),
"not to implement '".implode("', '", $interfaces)."'",
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
);