mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Merge pull request #1194 from dmason30/patch-1
Include method name in toHaveMethod error message
This commit is contained in:
@ -515,7 +515,7 @@ final class Expectation
|
|||||||
return Targeted::make(
|
return Targeted::make(
|
||||||
$this,
|
$this,
|
||||||
fn (ObjectDescription $object): bool => $object->reflectionClass->hasMethod($method),
|
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')),
|
FileLineFinder::where(fn (string $line): bool => str_contains($line, 'class')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user