mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Include method name in toHaveMethod error message
This commit is contained in:
@ -515,7 +515,7 @@ final class Expectation
|
||||
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')),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user