public function JsonFileLoaderTest::testLoadDoesNothingIfEmpty in Plug 7
File
- lib/
Symfony/ translation/ Tests/ Loader/ JsonFileLoaderTest.php, line 37
Class
Namespace
Symfony\Component\Translation\Tests\LoaderCode
public function testLoadDoesNothingIfEmpty() {
$loader = new JsonFileLoader();
$resource = __DIR__ . '/../fixtures/empty.json';
$catalogue = $loader
->load($resource, 'en', 'domain1');
$this
->assertEquals(array(), $catalogue
->all('domain1'));
$this
->assertEquals('en', $catalogue
->getLocale());
$this
->assertEquals(array(
new FileResource($resource),
), $catalogue
->getResources());
}