You are here

public function TranslatorTest::testTransWithFallbackLocaleBis in Plug 7

File

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

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTransWithFallbackLocaleBis() {
  $translator = new Translator('en_US');
  $translator
    ->addLoader('array', new ArrayLoader());
  $translator
    ->addResource('array', array(
    'foo' => 'foofoo',
  ), 'en_US');
  $translator
    ->addResource('array', array(
    'bar' => 'foobar',
  ), 'en');
  $this
    ->assertEquals('foobar', $translator
    ->trans('bar'));
}