You are here

public function TranslatorTest::testTransChoiceFallbackBis in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Tests/TranslatorTest.php \Symfony\Component\Translation\Tests\TranslatorTest::testTransChoiceFallbackBis()

File

vendor/symfony/translation/Tests/TranslatorTest.php, line 478

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTransChoiceFallbackBis() {
  $translator = new Translator('ru');
  $translator
    ->setFallbackLocales(array(
    'en_US',
    'en',
  ));
  $translator
    ->addLoader('array', new ArrayLoader());
  $translator
    ->addResource('array', array(
    'some_message2' => 'one thing|%count% things',
  ), 'en_US');
  $this
    ->assertEquals('10 things', $translator
    ->transChoice('some_message2', 10, array(
    '%count%' => 10,
  )));
}