mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 02:11:36 +00:00
27 lines
611 B
PHP
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());
|
|
}
|
|
}
|