Skip to content

Commit

Permalink
More unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Mar 21, 2024
1 parent 803de70 commit af8afd6
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/Cms/Languages/LanguageTranslationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af8afd6

Please sign in to comment.