Refactor MultiDownloaderClientTest class
This commit is contained in:
parent
4a2e0b83f2
commit
eec4975a0f
@ -26,11 +26,8 @@ class MultiDownloaderClientTest extends TestCase
|
||||
public function testDownloadAsString()
|
||||
{
|
||||
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
|
||||
|
||||
$client->setFiles($this->testFiles());
|
||||
|
||||
$response = $client->downloadAsString();
|
||||
|
||||
$md5 = md5($response);
|
||||
|
||||
$this->assertEquals('7542c2c2a0750ab9e62d50bbe83d4c1f', $md5);
|
||||
@ -39,12 +36,9 @@ class MultiDownloaderClientTest extends TestCase
|
||||
public function testDownloadTo()
|
||||
{
|
||||
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
|
||||
|
||||
$path = sys_get_temp_dir() . '/testDownloadTo.zip';
|
||||
|
||||
$client->setFiles($this->testFiles());
|
||||
$client->downloadTo($path);
|
||||
|
||||
$md5 = md5_file($path);
|
||||
|
||||
$this->assertFileExists($path);
|
||||
@ -56,6 +50,7 @@ class MultiDownloaderClientTest extends TestCase
|
||||
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
|
||||
$client->setFiles($this->testFiles());
|
||||
|
||||
echo $client->htmlForm($this->testFiles());
|
||||
echo $client->htmlForm();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user