fix HttpEventListenerTest strict arguments match

This commit is contained in:
sunxyw 2023-02-07 16:03:37 +08:00
parent 5a870c703d
commit e563ade103
No known key found for this signature in database
GPG Key ID: F391C42B19AFFC98

View File

@ -99,11 +99,7 @@ class HttpEventListenerTest extends TestCase
{
$handler = $this->prophesize(self::class);
if ($should_be_called) {
$handler->fakeHandler(
Argument::type('array'),
Argument::type(ServerRequest::class),
Argument::type(\HttpRequestEvent::class)
)->will(fn () => $callback ? $callback() : 'OK!')->shouldBeCalledOnce();
$handler->fakeHandler()->will(fn () => $callback ? $callback() : 'OK!')->shouldBeCalledOnce();
} else {
$handler->fakeHandler(Argument::cetera())->shouldNotBeCalled();
}