You are here

public function CsvFileLoaderTest::testLoadDoesNothingIfEmpty in Plug 7

File

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

Class

CsvFileLoaderTest

Namespace

Symfony\Component\Translation\Tests\Loader

Code

public function testLoadDoesNothingIfEmpty() {
  $loader = new CsvFileLoader();
  $resource = __DIR__ . '/../fixtures/empty.csv';
  $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());
}