mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
added FTP support to storage providers (#58)
* added FTP support to storage providers * build and code style fix
This commit is contained in:
29
tests/Feature/SSHCommands/Storage/UploadToFTPCommandTest.php
Normal file
29
tests/Feature/SSHCommands/Storage/UploadToFTPCommandTest.php
Normal 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());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user