*/ class FakeFileDownloader extends FileDownloader { /** * @throws \Thelia\Exception\FileNotFoundException * @throws \ErrorException * @throws \HttpUrlException * * Downloads the file $url in $pathToStore */ public function download($url, $pathToStore) { if (!file_exists($url) || !is_readable($url)) { throw new FileNotFoundException(); } if (!copy($url, $pathToStore)) { throw new \ErrorException(); } } }