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\DownloadFromFTPCommand;
use Tests\TestCase;
class DownloadFromFTPCommandTest extends TestCase
{
public function test_generate_command()
{
$command = new DownloadFromFTPCommand(
'src',
'dest',
'1.1.1.1',
'21',
'username',
'password',
false,
true,
);
$expected = <<<'EOD'
curl --ftp-pasv -u "username:password" ftp://1.1.1.1:21/src -o "dest"
EOD;
$this->assertStringContainsString($expected, $command->content());
}
}