R0.1: tote Dev-Varianten-Routen entfernt (fehlende Views -> 500 auf BP24)
/variant-1 + /variant-2 referenzierten nicht existierende Views web.businessportal24-variant-float-glow/-glass-gradient; Fragmente der alten Frontend-Version, nirgends verlinkt. Regressionstest ersetzt den Stub in DevExampleRoutesTest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
cb2fe97609
commit
1a612e04b2
2 changed files with 11 additions and 22 deletions
|
|
@ -206,26 +206,8 @@ Route::prefix('{edition}')->whereIn('edition', SetEdition::EDITIONS)->group(func
|
|||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Sprach-/Edition-unabhängige Routen (Dev-Varianten, API-Doku).
|
||||
// Sprach-/Edition-unabhängige Routen (API-Doku).
|
||||
// ---------------------------------------------------------------------------
|
||||
Route::get('/variant-1', function () {
|
||||
$domain = request()->getHost();
|
||||
if (str_contains($domain, 'presseecho')) {
|
||||
return view('web.presseecho');
|
||||
}
|
||||
|
||||
return view('web.businessportal24-variant-float-glow');
|
||||
})->name('variant-1');
|
||||
|
||||
Route::get('/variant-2', function () {
|
||||
$domain = request()->getHost();
|
||||
if (str_contains($domain, 'presseecho')) {
|
||||
return view('web.presseecho');
|
||||
}
|
||||
|
||||
return view('web.businessportal24-variant-glass-gradient');
|
||||
});
|
||||
|
||||
Route::get('/docs/api/v1', function () {
|
||||
return response((string) file_get_contents(base_path('docs/api/v1.yml')), 200, [
|
||||
'Content-Type' => 'application/yaml; charset=UTF-8',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
<?php
|
||||
|
||||
test('example', function () {
|
||||
$response = $this->get('/');
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Tests\TestCase;
|
||||
|
||||
$response->assertStatus(200);
|
||||
test('dev variant routes are removed', function () {
|
||||
expect(Route::has('variant-1'))->toBeFalse();
|
||||
|
||||
/** @var TestCase $this */
|
||||
$this->get('https://businessportal24.test/variant-1')->assertNotFound();
|
||||
$this->get('https://businessportal24.test/variant-2')->assertNotFound();
|
||||
$this->get('https://presseecho.test/variant-1')->assertNotFound();
|
||||
$this->get('https://presseecho.test/variant-2')->assertNotFound();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue