You are here

public function XliffFileLoaderTest::testLoad in Zircon Profile 8.0

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

File

vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php, line 19

Class

XliffFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

public function testLoad() {
  $loader = new XliffFileLoader();
  $resource = __DIR__ . '/../fixtures/resources.xlf';
  $catalogue = $loader
    ->load($resource, 'en', 'domain1');
  $this
    ->assertEquals('en', $catalogue
    ->getLocale());
  $this
    ->assertEquals(array(
    new FileResource($resource),
  ), $catalogue
    ->getResources());
  $this
    ->assertSame(array(), libxml_get_errors());
  $this
    ->assertContainsOnly('string', $catalogue
    ->all('domain1'));
}