You are here

public function XliffFileLoaderTest::testLoadWithInternalErrorsEnabled 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::testLoadWithInternalErrorsEnabled()

File

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

Class

XliffFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

public function testLoadWithInternalErrorsEnabled() {
  libxml_use_internal_errors(true);
  $this
    ->assertSame(array(), libxml_get_errors());
  $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());
}