We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 803de70 commit af8afd6Copy full SHA for af8afd6
tests/Cms/Languages/LanguageTranslationsTest.php
@@ -64,11 +64,25 @@ public function testGet()
64
]
65
]);
66
67
- $language = new Language(['code' => 'de']);
68
- $translations = $language->translationsObject();
+ $translations = new LanguageTranslations(new Language(['code' => 'de']));
69
$this->assertSame('Hallo Welt!', $translations->get('hello'));
70
}
71
+ /**
72
+ * @covers ::get
73
+ */
74
+ public function testGetDefault()
75
+ {
76
+ new App([
77
+ 'roots' => [
78
+ 'translations' => static::FIXTURES
79
+ ]
80
+ ]);
81
+
82
+ $translations = new LanguageTranslations(new Language(['code' => 'en']));
83
+ $this->assertSame('Hello dear!', $translations->get('not-exists', 'Hello dear!'));
84
+ }
85
86
/**
87
* @covers ::setTranslations
88
* @covers ::get
0 commit comments