-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw an exception in the provider, if the file does not exist
- Loading branch information
1 parent
0859ddd
commit fa9b4b5
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Amara\Varcon; | ||
|
||
use PHPUnit_Framework_TestCase; | ||
|
||
class TranslationProviderTest extends PHPUnit_Framework_TestCase | ||
{ | ||
public function testGetTranslationsFileNotFoundException() | ||
{ | ||
$translationProvider = new TranslationProvider('random-name-2439857.txt'); | ||
|
||
$this->setExpectedException(\RuntimeException::class, 'File not found: '); | ||
$translationProvider->getTranslations('B', 'A'); | ||
} | ||
} |