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

27 lines
611 B
PHP

<?php
namespace Tests\Feature\SSHCommands\System;
use App\SSHCommands\System\UpgradeCommand;
use Tests\TestCase;
class UpgradeCommandTest extends TestCase
{
public function test_generate_command()
{
$command = new UpgradeCommand();
$expected = <<<'EOD'
sudo DEBIAN_FRONTEND=noninteractive apt clean
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
sudo DEBIAN_FRONTEND=noninteractive apt autoremove -y
EOD;
$this->assertStringContainsString($expected, $command->content());
}
}