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

25 lines
607 B
PHP

<?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());
}
}