Skip to content

Commit

Permalink
Merge pull request #1194 from dmason30/patch-1
Browse files Browse the repository at this point in the history
Include method name in toHaveMethod error message
  • Loading branch information
nunomaduro authored Jul 20, 2024
2 parents ef12012 + ef29b4f commit 6a8a4f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Expectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
);
}
Expand Down

0 comments on commit 6a8a4f3

Please sign in to comment.