You are here

public function XliffFileLoaderTest::testLoadWithInternalErrorsEnabled in Plug 7

File

lib/Symfony/translation/Tests/Loader/XliffFileLoaderTest.php, line 30

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());
}