add custom message to failed expectations

This commit is contained in:
Fabio Ivona
2022-09-19 09:03:27 +02:00
parent c5cb1fc325
commit 8a3caa5e7f
55 changed files with 424 additions and 143 deletions

View File

@ -280,7 +280,7 @@ final class Expectation
{
if (! self::hasMethod($method)) {
/* @phpstan-ignore-next-line */
return new HigherOrderExpectation($this, $this->value->$method(...$parameters));
return new HigherOrderExpectation($this, call_user_func_array($this->value->$method(...), $parameters));
}
ExpectationPipeline::for($this->getExpectationClosure($method))