From a75f341b3513dffb82b1ab0a2f9914f64731a6c6 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 8 Oct 2018 22:40:45 +0200 Subject: [PATCH] expected PDOException on connection failure --- test/PDOPoweredTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/PDOPoweredTest.php b/test/PDOPoweredTest.php index ecb6bb2..6ce5781 100644 --- a/test/PDOPoweredTest.php +++ b/test/PDOPoweredTest.php @@ -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);