/** * Download image. * * @param string $originFile * @param string $downloadFolder * @param string|null $name * * @return File * * @throws ImageException */ public function download($originFile, $downloadFolder, $name = null) { if (false === $this->isValidOriginFile($originFile)) { throw new ImageException(sprintf('The origin file "%s" is not valid.', $originFile)); } return parent::download($originFile, $downloadFolder, $name); }
protected function assertEqualsFile($originFile) { $this->assertEquals(new File($this->filesystem, $originFile), $this->downloader->download($originFile, $this->tmpDir)); }