Skip to content

Commit

Permalink
expected PDOException on connection failure
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaRainone committed Oct 8, 2018
1 parent be6b2bb commit a75f341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/PDOPoweredTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ public function testConnectionWithWrongCredentials()
try {
$db->query("SELECT * FROM tabletest");
self::assertTrue(false, "An exception should be thrown if there are connection problem");
} catch (Exception $e) {
} catch (\PDOException $e) {
self::assertNotContains("wrongpass", $e->getMessage(), "Connection error should not contains the password");
self::assertNotEquals(0, $callbackCalled);
self::assertEquals(PDOPowered::$MAX_TRY_CONNECTION - 1, $callbackCalled);
Expand Down

0 comments on commit a75f341

Please sign in to comment.