vito/tests/Unit/SSHCommands/Installation/InstallNodejsCommandTest.php
Saeed Vaziry f70963d6bb
fix notification chanels and more tests (#108)
* fix notification chanels and more tests

* fix code style
2024-02-16 21:10:17 +01:00

25 lines
604 B
PHP

<?php
namespace Tests\Unit\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());
}
}