Skip to content

Commit f6041c1

Browse files
committed
test
1 parent 6488d79 commit f6041c1

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/Feature/TranslatorTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,26 @@
219219
]);
220220
});
221221

222+
it('sets json translations', function () {
223+
$translator = new Translator(
224+
storage: $this->getStorage(),
225+
);
226+
227+
$translator->setTranslations('fr', Translator::JSON_NAMESPACE, [
228+
'Missing' => 'Absent',
229+
'Empty' => 'Vide',
230+
]);
231+
232+
$translations = $translator->getTranslations('fr', Translator::JSON_NAMESPACE);
233+
234+
expect(
235+
$translations->toArray()
236+
)->toMatchArray([
237+
'Missing' => 'Absent',
238+
'Empty' => 'Vide',
239+
]);
240+
});
241+
222242
it('deletes translations', function () {
223243
$translator = new Translator(
224244
storage: $this->getStorage(),

0 commit comments

Comments
 (0)