public function testImage() { $file = $this->dir . 'test'; file_put_contents($file, base64_decode(self::IMAGE)); $this->download($file, true); // test $this->assertTrue($this->downloader->image($this->url, $file, true)); }
/** * @param string $url * @param EntityInterface $entity * * @return bool */ protected function uploadImageFromUrl($url, EntityInterface $entity) { return $this->downloader->image($url, $this->downloader->getRoot() . $entity->getWebPath()); }