public function MoFileLoaderTest::testLoadPlurals in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/translation/Tests/Loader/MoFileLoaderTest.php \Symfony\Component\Translation\Tests\Loader\MoFileLoaderTest::testLoadPlurals()
File
- vendor/
symfony/ translation/ Tests/ Loader/ MoFileLoaderTest.php, line 30
Class
Namespace
Symfony\Component\Translation\Tests\LoaderCode
public function testLoadPlurals() {
$loader = new MoFileLoader();
$resource = __DIR__ . '/../fixtures/plurals.mo';
$catalogue = $loader
->load($resource, 'en', 'domain1');
$this
->assertEquals(array(
'foo' => 'bar',
'foos' => '{0} bar|{1} bars',
), $catalogue
->all('domain1'));
$this
->assertEquals('en', $catalogue
->getLocale());
$this
->assertEquals(array(
new FileResource($resource),
), $catalogue
->getResources());
}