diff --git a/tests/Cms/Languages/LanguageTranslationsTest.php b/tests/Cms/Languages/LanguageTranslationsTest.php index 4eb1469dcf..5f69099c42 100644 --- a/tests/Cms/Languages/LanguageTranslationsTest.php +++ b/tests/Cms/Languages/LanguageTranslationsTest.php @@ -64,11 +64,25 @@ public function testGet() ] ]); - $language = new Language(['code' => 'de']); - $translations = $language->translationsObject(); + $translations = new LanguageTranslations(new Language(['code' => 'de'])); $this->assertSame('Hallo Welt!', $translations->get('hello')); } + /** + * @covers ::get + */ + public function testGetDefault() + { + new App([ + 'roots' => [ + 'translations' => static::FIXTURES + ] + ]); + + $translations = new LanguageTranslations(new Language(['code' => 'en'])); + $this->assertSame('Hello dear!', $translations->get('not-exists', 'Hello dear!')); + } + /** * @covers ::setTranslations * @covers ::get