From 71834da8c6f7b24b0c15c57556e053ccd671aa3a Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:33 +0100 Subject: Ensure dispatch runs middleware method --- tests/Unit/RouterTest.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/Unit/RouterTest.php b/tests/Unit/RouterTest.php index a8769c4..4a92381 100644 --- a/tests/Unit/RouterTest.php +++ b/tests/Unit/RouterTest.php @@ -197,6 +197,10 @@ it('calls strategy runRoute with dispatch on match', function () { ->with(Mockery::type(RouteCall::class)) ->andReturn($response); + $strat->shouldReceive('runMiddleware') + ->with($request, [], Mockery::type('callable')) + ->andReturn($response); + $router->setStrategy($strat); $result = $router->dispatch($request); expect($result)->toBe($response); -- cgit v1.2.3