diff options
Diffstat (limited to 'tests/Unit/RouterTest.php')
| -rw-r--r-- | tests/Unit/RouterTest.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/Unit/RouterTest.php b/tests/Unit/RouterTest.php index 9e9de88..5b11caf 100644 --- a/tests/Unit/RouterTest.php +++ b/tests/Unit/RouterTest.php @@ -234,14 +234,8 @@ it('makes a post route', function () { ->toBeInstanceOf(RouteMatch::class); }); -$methodGenerator = function (): Generator { - foreach (HttpMethod::cases() as $m) { - yield $m->value => $m; - } -}; - it('makes a :dataset route') - ->with($methodGenerator) + ->with('http-methods') ->expect(function (HttpMethod $m) { $router = new Router(); $router->{$m->value}($p = '/test1/test2', fn () => null); @@ -257,7 +251,7 @@ it('returns RouteDefinition when making route') ->toBeInstanceOf(RouteDefinition::class); it('returns RouteDefinition when making :dataset route') - ->with($methodGenerator) + ->with('http-methods') ->expect(fn (HttpMethod $m) => (new Router())->{$m->value}('/test', fn () => null)) ->toBeInstanceOf(RouteDefinition::class); |
