You are here

public function MoFileLoaderTest::testLoadEmptyTranslation in Plug 7

File

lib/Symfony/translation/Tests/Loader/MoFileLoaderTest.php, line 61

Class

MoFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

public function testLoadEmptyTranslation() {
  $loader = new MoFileLoader();
  $resource = __DIR__ . '/../fixtures/empty-translation.mo';
  $catalogue = $loader
    ->load($resource, 'en', 'message');
  $this
    ->assertEquals(array(), $catalogue
    ->all('message'));
  $this
    ->assertEquals('en', $catalogue
    ->getLocale());
  $this
    ->assertEquals(array(
    new FileResource($resource),
  ), $catalogue
    ->getResources());
}