You are here

public function PoFileLoaderTest::testEscapedId in Zircon Profile 8

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

File

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

Class

PoFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

public function testEscapedId() {
  $loader = new PoFileLoader();
  $resource = __DIR__ . '/../fixtures/escaped-id.po';
  $catalogue = $loader
    ->load($resource, 'en', 'domain1');
  $messages = $catalogue
    ->all('domain1');
  $this
    ->assertArrayHasKey('escaped "foo"', $messages);
  $this
    ->assertEquals('escaped "bar"', $messages['escaped "foo"']);
}