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); $handler = $this->prophesize(self::class);
if ($should_be_called) { if ($should_be_called) {
$handler->fakeHandler( $handler->fakeHandler()->will(fn () => $callback ? $callback() : 'OK!')->shouldBeCalledOnce();
Argument::type('array'),
Argument::type(ServerRequest::class),
Argument::type(\HttpRequestEvent::class)
)->will(fn () => $callback ? $callback() : 'OK!')->shouldBeCalledOnce();
} else { } else {
$handler->fakeHandler(Argument::cetera())->shouldNotBeCalled(); $handler->fakeHandler(Argument::cetera())->shouldNotBeCalled();
} }