You are here

public function TranslatorTest::testTransNonExistentWithFallback in Plug 7

File

lib/Symfony/translation/Tests/TranslatorTest.php, line 257

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTransNonExistentWithFallback() {
  $translator = new Translator('fr');
  $translator
    ->setFallbackLocales(array(
    'en',
  ));
  $translator
    ->addLoader('array', new ArrayLoader());
  $this
    ->assertEquals('non-existent', $translator
    ->trans('non-existent'));
}