vito/tests/Feature/SSHCommands/System/RunScriptCommandTest.php
Saeed Vaziry 38e23a1ceb
fix consecutive deployment issue (#62)
* fix consecutive deployment issue

* fix styles
2023-09-29 23:08:56 +02:00

25 lines
500 B
PHP

<?php
namespace Tests\Feature\SSHCommands\System;
use App\SSHCommands\System\RunScriptCommand;
use Tests\TestCase;
class RunScriptCommandTest extends TestCase
{
public function test_generate_command()
{
$command = new RunScriptCommand('/path', 'script');
$expected = <<<'EOD'
if ! cd /path; then
echo 'VITO_SSH_ERROR' && exit 1
fi
script
EOD;
$this->assertStringContainsString($expected, $command->content());
}
}