fix HttpEventListenerTest strict arguments match

This commit is contained in:
sunxyw
2023-02-07 16:03:37 +08:00
parent 5a870c703d
commit e563ade103

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();
}