diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:33 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:33 +0100 |
| commit | cfc25964f93e2bdcfec6ac4f3d52c658d66f4d2b (patch) | |
| tree | a64eef402b9c999c6851bd8cf97002c39e5c4bde /tests/Unit/GroupDefinitionTest.php | |
| parent | 65bb048bf3c3d4226b8d7580592b62351e07a7e6 (diff) | |
testing adding middleware to routes and groups
Diffstat (limited to 'tests/Unit/GroupDefinitionTest.php')
| -rw-r--r-- | tests/Unit/GroupDefinitionTest.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/Unit/GroupDefinitionTest.php b/tests/Unit/GroupDefinitionTest.php index 3ea8275..51ac76f 100644 --- a/tests/Unit/GroupDefinitionTest.php +++ b/tests/Unit/GroupDefinitionTest.php @@ -8,6 +8,7 @@ use Lightscale\Router\GroupDefinition; use Lightscale\Router\PathSegmentMatch; use Lightscale\Router\RouteDefinition; use Lightscale\Router\Router; +use Lightscale\Router\Test\Utils\TestMiddleware; $make = fn () => new GroupDefinition(new Group(new Router(), null)); @@ -42,4 +43,6 @@ it('returns RouteDefinition when making :dataset route') ) ->toBeInstanceOf(RouteDefinition::class); -it('can create a group with middleware')->todo(); +it('can create a group with middleware') + ->expect($make()->middleware(new TestMiddleware())) + ->toBeInstanceOf(Group::class); |
