public function PoFileLoaderTest::testEscapedIdPlurals in Plug 7
File
- lib/
Symfony/ translation/ Tests/ Loader/ PoFileLoaderTest.php, line 84
Class
Namespace
Symfony\Component\Translation\Tests\LoaderCode
public function testEscapedIdPlurals() {
$loader = new PoFileLoader();
$resource = __DIR__ . '/../fixtures/escaped-id-plurals.po';
$catalogue = $loader
->load($resource, 'en', 'domain1');
$messages = $catalogue
->all('domain1');
$this
->assertArrayHasKey('escaped "foo"', $messages);
$this
->assertArrayHasKey('escaped "foos"', $messages);
$this
->assertEquals('escaped "bar"', $messages['escaped "foo"']);
$this
->assertEquals('escaped "bar"|escaped "bars"', $messages['escaped "foos"']);
}