You are here

public function MoFileLoaderTest::testLoadEmptyTranslation in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php \Symfony\Component\Translation\Tests\Loader\MoFileLoaderTest::testLoadEmptyTranslation()

File

vendor/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());
}