public function TranslatorTest::testTransWithFallbackLocaleFile in Plug 7
@dataProvider getTransFileTests
File
- lib/
Symfony/ translation/ Tests/ TranslatorTest.php, line 224
Class
Namespace
Symfony\Component\Translation\TestsCode
public function testTransWithFallbackLocaleFile($format, $loader) {
$loaderClass = 'Symfony\\Component\\Translation\\Loader\\' . $loader;
$translator = new Translator('en_GB');
$translator
->addLoader($format, new $loaderClass());
$translator
->addResource($format, __DIR__ . '/fixtures/non-existing', 'en_GB');
$translator
->addResource($format, __DIR__ . '/fixtures/resources.' . $format, 'en', 'resources');
$this
->assertEquals('bar', $translator
->trans('foo', array(), 'resources'));
}