Skip to content

Commit

Permalink
Use test case from issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Aug 12, 2024
1 parent f7563bc commit df12c54
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions tests/Cms/Languages/LanguageRoutesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ public function setUp(): void
public function testFallback()
{
$app = $this->app->clone([
'languages' => [
[
'code' => 'fr',
'name' => 'French',
'default' => true,
'url' => '/',
],
[
'code' => 'en',
'name' => 'English',
'url' => '/en',
],
],
'site' => [
'children' => [
[
Expand All @@ -48,10 +61,10 @@ public function testFallback()
]);

$app->call('notes');
$this->assertSame($app->language()->code(), 'en');
$this->assertSame($app->language()->code(), 'fr');

$app->call('de/notes');
$this->assertSame($app->language()->code(), 'de');
$app->call('en/notes');
$this->assertSame($app->language()->code(), 'en');
}

public function testNotNextWhenFalsyReturn()
Expand Down

0 comments on commit df12c54

Please sign in to comment.