Files
ABSDEV/tests/Feature/Release/RouteNameIntegrityTest.php
2026-07-24 14:19:51 +01:00

13 lines
388 B
PHP

<?php
use Illuminate\Support\Facades\Route;
it('does not register duplicate named routes', function (): void {
$names = collect(Route::getRoutes())
->map(fn ($route): ?string => $route->getName())
->filter(fn (?string $name): bool => filled($name) && ! str_ends_with($name, '.'))
->values();
expect($names->duplicates()->values()->all())->toBe([]);
});