mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
code style fix
add command tests
This commit is contained in:
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Installation;
|
||||
|
||||
use App\SSHCommands\Installation\InstallNodejsCommand;
|
||||
use Tests\TestCase;
|
||||
|
||||
class InstallNodejsCommandTest extends TestCase
|
||||
{
|
||||
public function test_generate_command()
|
||||
{
|
||||
$command = new InstallNodejsCommand();
|
||||
|
||||
$expected = <<<'EOD'
|
||||
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -;
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install nodejs -y
|
||||
EOD;
|
||||
|
||||
$this->assertStringContainsString($expected, $command->content());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user