| @@ 52-60 (lines=9) @@ | ||
| 49 | * |
|
| 50 | * @return void |
|
| 51 | */ |
|
| 52 | public function testCreateUserQuery() |
|
| 53 | { |
|
| 54 | $connection = $this->getConnection(); |
|
| 55 | ||
| 56 | $this |
|
| 57 | ->if($this->newTestedInstance($connection)) |
|
| 58 | ->string($this->testedInstance->createUserQuery('test_username', '!super_secure_password$')) |
|
| 59 | ->isEqualTo('CREATE USER test_username@localhost IDENTIFIED BY "!super_secure_password$";'); |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * Test dropUser method. |
|
| @@ 67-75 (lines=9) @@ | ||
| 64 | * |
|
| 65 | * @return void |
|
| 66 | */ |
|
| 67 | public function testDropUserQuery() |
|
| 68 | { |
|
| 69 | $connection = $this->getConnection(); |
|
| 70 | ||
| 71 | $this |
|
| 72 | ->if($this->newTestedInstance($connection)) |
|
| 73 | ->string($this->testedInstance->dropUserQuery('test_username', '!super_secure_password$')) |
|
| 74 | ->isEqualTo('DROP USER test_username@localhost;'); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Test userExistQuery method. |
|
| @@ 82-90 (lines=9) @@ | ||
| 79 | * |
|
| 80 | * @return void |
|
| 81 | */ |
|
| 82 | public function testUserExistQuery() |
|
| 83 | { |
|
| 84 | $connection = $this->getConnection(); |
|
| 85 | ||
| 86 | $this |
|
| 87 | ->if($this->newTestedInstance($connection)) |
|
| 88 | ->string($this->testedInstance->userExistQuery('test_username')) |
|
| 89 | ->isEqualTo('SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = "test_username");'); |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * Test flushPrivilegesQuery method. |
|