$loader ->
method('loadFile'
)->
willReturnCallback(static function Dstring
$path, string
$file) { $file = \
dirname(__DIR__
) . '/' .
$path . '/' .
$file;
if (!
file_exists($file)) { return null;
} return file_get_contents($file);
});
$this->scriptReader =
new ScriptFileReader($loader);
} public function testGetScriptPathsForApp(): void
{ $scripts =
$this->scriptReader->
getScriptPathsForApp('Manifest/_fixtures/test'
);
sort($scripts);
static::
assertEquals( [ 'app-activated/activate-script.twig',
'app-deactivated/deactivate-script.twig',