mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 10:21:37 +00:00
24 lines
681 B
PHP
24 lines
681 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\SSHCommands\Storage;
|
|
|
|
use App\SSHCommands\Storage\DownloadFromDropboxCommand;
|
|
use Tests\TestCase;
|
|
|
|
class DownloadFromDropboxCommandTest extends TestCase
|
|
{
|
|
public function test_generate_command()
|
|
{
|
|
$command = new DownloadFromDropboxCommand('src', 'dest', 'token');
|
|
|
|
$expected = <<<EOD
|
|
curl -o dest --location --request POST 'https://content.dropboxapi.com/2/files/download' \
|
|
--header 'Accept: application/json' \
|
|
--header 'Dropbox-API-Arg: {"path":"src"}' \
|
|
--header 'Authorization: Bearer token'
|
|
EOD;
|
|
|
|
$this->assertStringContainsString($expected, $command->content());
|
|
}
|
|
}
|