diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | 18669556d3f5e20bd92fd7731c774038d8b50e7e (patch) | |
| tree | 14adc0b946a31839a42a19a544c65c6b215c907f /tests | |
| parent | e4bb526bfda6aef396b551fb14a09ab9b2cfae53 (diff) | |
generate named route
Diffstat (limited to 'tests')
| -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'); +}); + |
