/** @var Translator $translator */
$translator =
$this->
getTranslator($loader,
[ 'resource_files' =>
$resourceFiles,
'scanned_directories' =>
[__DIR__, '/tmp/I/sure/hope/this/does/not/exist'
],
], 'yml'
);
$catalogue =
$translator->
getCatalogue('fr'
);
$resources =
$catalogue->
getResources();
$this->
assertEquals(new DirectoryResource(__DIR__
),
$resources[1
]);
$this->
assertEquals(new FileExistenceResource('/tmp/I/sure/hope/this/does/not/exist'
),
$resources[2
]);
} public function testCachedCatalogueIsReDumpedWhenScannedDirectoriesChange() { /** @var Translator $translator */
$translator =
$this->
getTranslator(new YamlFileLoader(),
[ 'cache_dir' =>
$this->tmpDir,
'resource_files' =>
[ 'fr' =>
[ __DIR__.'/../Fixtures/Resources/translations/messages.fr.yml',
],