vito/tests/Feature/SSHCommands/Service/StopServiceCommandTest.php
Saeed Vaziry e1eb42059f code style fix
add command tests
2023-09-02 16:41:42 +02:00

23 lines
472 B
PHP

<?php
namespace Tests\Feature\SSHCommands\Service;
use App\SSHCommands\Service\StopServiceCommand;
use Tests\TestCase;
class StopServiceCommandTest extends TestCase
{
public function test_generate_command()
{
$command = new StopServiceCommand('nginx');
$expected = <<<'EOD'
sudo service nginx stop
sudo service nginx status | cat
EOD;
$this->assertStringContainsString($expected, $command->content());
}
}