You are here

public function PoFileLoaderTest::testLoadEmptyTranslation in Plug 7

File

lib/Symfony/translation/Tests/Loader/PoFileLoaderTest.php, line 62

Class

PoFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

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