You are here

public function TranslatorTest::testTransChoiceFallbackWithNoTranslation 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::testTransChoiceFallbackWithNoTranslation()

File

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

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTransChoiceFallbackWithNoTranslation() {
  $translator = new Translator('ru');
  $translator
    ->setFallbackLocales(array(
    'en',
  ));
  $translator
    ->addLoader('array', new ArrayLoader());

  // consistent behavior with Translator::trans(), which returns the string
  // unchanged if it can't be found
  $this
    ->assertEquals('some_message2', $translator
    ->transChoice('some_message2', 10, array(
    '%count%' => 10,
  )));
}