summaryrefslogtreecommitdiff
path: root/tests/Unit/RouterTest.php
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 19:00:33 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 19:00:33 +0100
commit71834da8c6f7b24b0c15c57556e053ccd671aa3a (patch)
treeb60c1da376ad4839b99b0bd533ed536a29f62871 /tests/Unit/RouterTest.php
parentcfc25964f93e2bdcfec6ac4f3d52c658d66f4d2b (diff)
Ensure dispatch runs middleware method
Diffstat (limited to 'tests/Unit/RouterTest.php')
-rw-r--r--tests/Unit/RouterTest.php4
1 files changed, 4 insertions, 0 deletions
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);