You are here

public function PoFileLoaderTest::testLoadPlurals in Zircon Profile 8.0

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

File

vendor/symfony/translation/Tests/Loader/PoFileLoaderTest.php, line 30

Class

PoFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

public function testLoadPlurals() {
  $loader = new PoFileLoader();
  $resource = __DIR__ . '/../fixtures/plurals.po';
  $catalogue = $loader
    ->load($resource, 'en', 'domain1');
  $this
    ->assertEquals(array(
    'foo' => 'bar',
    'foos' => 'bar|bars',
  ), $catalogue
    ->all('domain1'));
  $this
    ->assertEquals('en', $catalogue
    ->getLocale());
  $this
    ->assertEquals(array(
    new FileResource($resource),
  ), $catalogue
    ->getResources());
}