FileOptions class
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-01-12 14:00:06 +00:00
parent bd500406d3
commit e389e72844
6 changed files with 56 additions and 11 deletions

View File

@@ -16,8 +16,10 @@ class MultiDownloaderClientTest extends TestCase
private function testFiles()
{
return array_map(function ($url, $i) {
return (new FileRequest($url))
->fileOptions(['name' => 'test' . $i . '.png']);
$file = new FileRequest($url);
$file->getFileOptions()->name('test' . $i . '.png');
return $file;
}, $this->testFiles, array_keys($this->testFiles));
}
@@ -38,7 +40,7 @@ class MultiDownloaderClientTest extends TestCase
{
$client = new MultiDownloaderClient(['apiKey' => 'test', 'apiSecret' => 'test']);
$path = __DIR__ . '/testDownloadTo.zip';
$path = sys_get_temp_dir() . '/testDownloadTo.zip';
$client->setFiles($this->testFiles());
$client->downloadTo($path);

Binary file not shown.