added FTP support to storage providers (#58)

* added FTP support to storage providers

* build and code style fix
This commit is contained in:
Saeed Vaziry
2023-09-24 12:50:01 +02:00
committed by GitHub
parent 2c81e324f6
commit 7d98986f52
23 changed files with 409 additions and 27 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace Tests\Feature\SSHCommands\Storage;
use App\SSHCommands\Storage\UploadToFTPCommand;
use Tests\TestCase;
class UploadToFTPCommandTest extends TestCase
{
public function test_generate_command()
{
$command = new UploadToFTPCommand(
'src',
'dest',
'1.1.1.1',
'21',
'username',
'password',
true,
true
);
$expected = <<<'EOD'
curl --ftp-pasv -T "src" -u "username:password" ftps://1.1.1.1:21/dest
EOD;
$this->assertStringContainsString($expected, $command->content());
}
}