@@ -153,7 +153,7 @@ |
||
| 153 | 153 | */ |
| 154 | 154 | public function testCannotStablishConnection() |
| 155 | 155 | { |
| 156 | - $this->options["dbhost"] = "myserver"; // this server does not exists |
|
| 156 | + $this->options["dbhost"] = "myserver"; // this server does not exists |
|
| 157 | 157 | |
| 158 | 158 | $conn = new MySQL($this->options); |
| 159 | 159 | |
@@ -93,12 +93,10 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | try { |
| 95 | 95 | $conn->disconnect(); |
| 96 | - } |
|
| 97 | - catch (\Exception $e) |
|
| 96 | + } catch (\Exception $e) |
|
| 98 | 97 | { |
| 99 | 98 | $errorObject = ($e instanceof \LogicException); |
| 100 | - } |
|
| 101 | - finally |
|
| 99 | + } finally |
|
| 102 | 100 | { |
| 103 | 101 | $this->assertNotTrue($conn->isConnected()); |
| 104 | 102 | $this->assertTrue($errorObject, $e->getMessage()); |
@@ -134,12 +132,10 @@ discard block |
||
| 134 | 132 | |
| 135 | 133 | try { |
| 136 | 134 | $conn->reconnect(); |
| 137 | - } |
|
| 138 | - catch (\Exception $e) |
|
| 135 | + } catch (\Exception $e) |
|
| 139 | 136 | { |
| 140 | 137 | $errorObject = ($e instanceof \LogicException); |
| 141 | - } |
|
| 142 | - finally |
|
| 138 | + } finally |
|
| 143 | 139 | { |
| 144 | 140 | $this->assertTrue($errorObject, $e->getMessage()); |
| 145 | 141 | $this->assertNotTrue($conn->isConnected()); |
@@ -161,12 +157,10 @@ discard block |
||
| 161 | 157 | |
| 162 | 158 | try { |
| 163 | 159 | $mysqliObject = $conn->connect(); |
| 164 | - } |
|
| 165 | - catch (\Exception $e) |
|
| 160 | + } catch (\Exception $e) |
|
| 166 | 161 | { |
| 167 | 162 | $errorObject = ($e instanceof ConnectionException); |
| 168 | - } |
|
| 169 | - finally |
|
| 163 | + } finally |
|
| 170 | 164 | { |
| 171 | 165 | $this->assertTrue($errorObject, $e->getMessage()); |
| 172 | 166 | $this->assertNotTrue($conn->isConnected()); |