mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
fix: revert higher order message property
This commit is contained in:
@ -55,7 +55,9 @@ final class HigherOrderMessage
|
||||
}
|
||||
|
||||
try {
|
||||
return Reflection::call($target, $this->name, is_array($this->arguments) ? $this->arguments : []);
|
||||
return is_array($this->arguments)
|
||||
? Reflection::call($target, $this->name, $this->arguments)
|
||||
: $target->{$this->name}; /* @phpstan-ignore-line */
|
||||
} catch (Throwable $throwable) {
|
||||
Reflection::setPropertyValue($throwable, 'file', $this->filename);
|
||||
Reflection::setPropertyValue($throwable, 'line', $this->line);
|
||||
|
||||
@ -7,7 +7,7 @@ test('undefined method exceptions', function () {
|
||||
__FILE__,
|
||||
1,
|
||||
'foqwdqwd',
|
||||
null
|
||||
[]
|
||||
);
|
||||
|
||||
expect(fn () => $message->call($this))->toThrow(function (ReflectionException $exception) {
|
||||
|
||||
Reference in New Issue
Block a user