use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Translation\Exception\InvalidResourceException;
use Symfony\Component\Translation\Exception\NotFoundResourceException;
use Symfony\Component\Translation\Loader\XliffFileLoader;
class XliffFileLoaderTest extends TestCase
{ public function testLoadFile() { $loader =
new XliffFileLoader();
$resource = __DIR__.'/../fixtures/resources.xlf';
$catalogue =
$loader->
load($resource, 'en', 'domain1'
);
$this->
assertEquals('en',
$catalogue->
getLocale());
$this->
assertEquals([new FileResource($resource)],
$catalogue->
getResources());
$this->
assertSame([],
libxml_get_errors());
$this->
assertContainsOnly('string',
$catalogue->
all('domain1'
));
} public function testLoadRawXliff() {