Skip to content

Commit

Permalink
Added test exception
Browse files Browse the repository at this point in the history
  • Loading branch information
accgit committed Dec 12, 2019
1 parent 1f63560 commit 536cb2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Translator/Translator.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ $translator->setFile(__DIR__ . '/en');

Assert::type('string', $translator->translate('hello.world'));
Assert::same('Hello, world!', $translator->translate('hello.world'));
Assert::exception(function () use ($translator) {
$translator->setFile('');
}, Exception::class, 'The translation file was not found.');

0 comments on commit 536cb2e

Please sign in to comment.