You are here

public function TranslatorTest::testTransChoiceFallbackWithNoTranslation in Plug 7

File

lib/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,
  )));
}