das marketing frontend wurde auf lokalisierte urls umgestellt.
This commit is contained in:
73
tests/Feature/MarketingLocaleRoutingTest.php
Normal file
73
tests/Feature/MarketingLocaleRoutingTest.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class MarketingLocaleRoutingTest extends TestCase
|
||||
{
|
||||
public function test_contact_page_is_accessible_in_german(): void
|
||||
{
|
||||
$response = $this->get('/de/kontakt');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_contact_page_is_accessible_in_english(): void
|
||||
{
|
||||
$response = $this->get('/en/contact');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_german_contact_slug_redirects_to_english_variant_when_locale_is_english(): void
|
||||
{
|
||||
$response = $this->get('/en/kontakt');
|
||||
|
||||
$response->assertRedirect(route('marketing.contact', [
|
||||
'locale' => 'en',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_english_contact_slug_redirects_to_german_variant_when_locale_is_german(): void
|
||||
{
|
||||
$response = $this->get('/de/contact');
|
||||
|
||||
$response->assertRedirect(route('kontakt', [
|
||||
'locale' => 'de',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_occasion_canonical_slugs_resolve_for_both_locales(): void
|
||||
{
|
||||
$this->get('/de/anlaesse/hochzeit')->assertStatus(200);
|
||||
$this->get('/en/occasions/wedding')->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_english_locale_redirects_from_german_occasions_slug(): void
|
||||
{
|
||||
$response = $this->get('/en/anlaesse/hochzeit');
|
||||
|
||||
$response->assertRedirect(route('occasions.type', [
|
||||
'locale' => 'en',
|
||||
'type' => 'wedding',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_german_locale_redirects_from_english_occasions_slug(): void
|
||||
{
|
||||
$response = $this->get('/de/occasions/wedding');
|
||||
|
||||
$response->assertRedirect(route('anlaesse.type', [
|
||||
'locale' => 'de',
|
||||
'type' => 'hochzeit',
|
||||
]));
|
||||
}
|
||||
|
||||
public function test_legal_pages_render_for_german_locale(): void
|
||||
{
|
||||
$this->get('/de/impressum')->assertStatus(200);
|
||||
$this->get('/de/datenschutz')->assertStatus(200);
|
||||
$this->get('/de/agb')->assertStatus(200);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user