public function TranslatorTest::testTransChoiceFallback in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/translation/Tests/TranslatorTest.php \Symfony\Component\Translation\Tests\TranslatorTest::testTransChoiceFallback()
File
- vendor/
symfony/ translation/ Tests/ TranslatorTest.php, line 468
Class
Namespace
Symfony\Component\Translation\TestsCode
public function testTransChoiceFallback() {
$translator = new Translator('ru');
$translator
->setFallbackLocales(array(
'en',
));
$translator
->addLoader('array', new ArrayLoader());
$translator
->addResource('array', array(
'some_message2' => 'one thing|%count% things',
), 'en');
$this
->assertEquals('10 things', $translator
->transChoice('some_message2', 10, array(
'%count%' => 10,
)));
}