public function TranslatorTest::testTransWithFallbackLocaleFile in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/Tests/TranslatorTest.php \Symfony\Component\Translation\Tests\TranslatorTest::testTransWithFallbackLocaleFile()
@dataProvider getTransFileTests
File
- vendor/
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'));
}