diff options
Diffstat (limited to 'tests/Unit')
| -rw-r--r-- | tests/Unit/RouterTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Unit/RouterTest.php b/tests/Unit/RouterTest.php index b3013bb..5583c80 100644 --- a/tests/Unit/RouterTest.php +++ b/tests/Unit/RouterTest.php @@ -270,3 +270,11 @@ it('overrides existing named routes', function () { ->not->toBe($route1) ->toBe($route2); }); + +it('generates route from name', function() { + $router = new Router(); + $router->get('/test', fn() => null)->name('test'); + + expect($router->route('test'))->toBe('/test'); +}); + |
