You are here

public function JsonFileLoaderTest::testLoadDoesNothingIfEmpty in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php \Symfony\Component\Translation\Tests\Loader\JsonFileLoaderTest::testLoadDoesNothingIfEmpty()

File

vendor/symfony/translation/Tests/Loader/JsonFileLoaderTest.php, line 37

Class

JsonFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

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