use Symfony\Component\Translation\Exception\NotFoundResourceException;
use Symfony\Component\Translation\Loader\IcuDatFileLoader;
/**
* @requires extension intl
*/
class IcuDatFileLoaderTest extends LocalizedTestCase
{ public function testLoadInvalidResource() { $this->
expectException(InvalidResourceException::
class);
$loader =
new IcuDatFileLoader();
$loader->
load(__DIR__.'/../fixtures/resourcebundle/corrupted/resources', 'es', 'domain2'
);
} public function testDatEnglishLoad() { // bundled resource is build using pkgdata command which at least in ICU 4.2 comes in extremely! buggy form
// you must specify an temporary build directory which is not the same as current directory and
// MUST reside on the same partition. pkgdata -p resources -T /srv -d.packagelist.txt
$loader =
new IcuDatFileLoader();
$resource = __DIR__.'/../fixtures/resourcebundle/dat/resources';
$catalogue =
$loader->
load($resource, 'en', 'domain1'
);