public function TranslatorTest::testTransWithoutFallbackLocaleFile in Plug 7
@dataProvider getTransFileTests @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException
File
- lib/
Symfony/ translation/ Tests/ TranslatorTest.php, line 209
Class
Namespace
Symfony\Component\Translation\TestsCode
public function testTransWithoutFallbackLocaleFile($format, $loader) {
$loaderClass = 'Symfony\\Component\\Translation\\Loader\\' . $loader;
$translator = new Translator('en');
$translator
->addLoader($format, new $loaderClass());
$translator
->addResource($format, __DIR__ . '/fixtures/non-existing', 'en');
$translator
->addResource($format, __DIR__ . '/fixtures/resources.' . $format, 'en');
// force catalogue loading
$translator
->trans('foo');
}