public function testDownload() { $filePath = tempnam(sys_get_temp_dir(), 'php_curl_download_'); $client = new Client(); $client->download($this->testUrl . '/tree.jpg', $filePath); $this->assertEquals('image/jpeg', mime_content_type($filePath)); $this->assertEquals(57883, filesize($filePath)); }