diff --git a/src/Expectation.php b/src/Expectation.php index a410cf1d..2b2fde8a 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -515,7 +515,7 @@ public function toHaveMethod(string $method): ArchExpectation return Targeted::make( $this, fn (ObjectDescription $object): bool => $object->reflectionClass->hasMethod($method), - 'to have method', + sprintf("to have method '%s'", $method), FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')), ); }