vito/tests/Unit/SSHCommands/Database/DeleteUserCommandTest.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

19 lines
511 B
PHP

<?php
namespace Tests\Unit\SSHCommands\Database;
use App\SSHCommands\Database\DeleteUserCommand;
use Tests\TestCase;
class DeleteUserCommandTest extends TestCase
{
public function test_generate_command()
{
$command = new DeleteUserCommand('mysql', 'user', '%');
$this->assertStringContainsString('sudo mysql -e "DROP USER IF EXISTS \'user\'@\'%\'";', $command->content());
$this->assertStringContainsString('sudo mysql -e "FLUSH PRIVILEGES";', $command->content());
}
}