You are here

public function TranslatorTest::testTransWithoutFallbackLocaleFile in Plug 7

@dataProvider getTransFileTests @expectedException \Symfony\Component\Translation\Exception\NotFoundResourceException

File

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

Class

TranslatorTest

Namespace

Symfony\Component\Translation\Tests

Code

public function testTransWithoutFallbackLocaleFile($format, $loader) {
  $loaderClass = 'Symfony\\Component\\Translation\\Loader\\' . $loader;
  $translator = new Translator('en');
  $translator
    ->addLoader($format, new $loaderClass());
  $translator
    ->addResource($format, __DIR__ . '/fixtures/non-existing', 'en');
  $translator
    ->addResource($format, __DIR__ . '/fixtures/resources.' . $format, 'en');

  // force catalogue loading
  $translator
    ->trans('foo');
}