Use $acfFileUrl instead of the provided $fileUrl
public copy ( string $originUrl, string $fileUrl, string $fileName, boolean $progress = true, array $options = [] ) : boolean | ||
$originUrl | string | The origin URL |
$fileUrl | string | The file URL (ignored) |
$fileName | string | the local filename |
$progress | boolean | Display the progression |
$options | array | Additional context options |
return | boolean | true |
public function testCopyUsesAcfFileUrl() { $acfFileUrl = 'file://' . __FILE__; $rfs = new RemoteFilesystem($acfFileUrl, $this->io); $file = tempnam(sys_get_temp_dir(), 'pb'); $this->assertTrue($rfs->copy('http://example.org', 'does-not-exist', $file)); $this->assertFileExists($file); unlink($file); }