mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 06:26:16 +00:00
code style fix
add command tests
This commit is contained in:
18
tests/Feature/SSHCommands/Database/CreateCommandTest.php
Normal file
18
tests/Feature/SSHCommands/Database/CreateCommandTest.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\SSHCommands\Database;
|
||||
|
||||
use App\SSHCommands\Database\CreateCommand;
|
||||
use Tests\TestCase;
|
||||
|
||||
class CreateCommandTest extends TestCase
|
||||
{
|
||||
public function test_generate_command()
|
||||
{
|
||||
$command = new CreateCommand('mysql', 'test');
|
||||
|
||||
$this->assertStringContainsString('sudo mysql -e "CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8 COLLATE utf8_general_ci";', $command->content());
|
||||
|
||||
$this->assertStringContainsString('echo "Command executed"', $command->content());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user