From df12c542c0ae3a66e8b89ee33b5561c948827559 Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Mon, 12 Aug 2024 12:43:41 +0200 Subject: [PATCH] Use test case from issue --- tests/Cms/Languages/LanguageRoutesTest.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/Cms/Languages/LanguageRoutesTest.php b/tests/Cms/Languages/LanguageRoutesTest.php index 0766633027..6b9c2e1fe8 100644 --- a/tests/Cms/Languages/LanguageRoutesTest.php +++ b/tests/Cms/Languages/LanguageRoutesTest.php @@ -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' => [ [ @@ -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()