From fcd128a887a4a6aa5019abe04cf2b165009a9b60 Mon Sep 17 00:00:00 2001 From: "steven.lewis" Date: Sun, 7 Nov 2021 10:30:43 +0000 Subject: [PATCH] re-add PdoInterface::getAvailableDrivers() and add a test for this method. --- src/PdoInterface.php | 2 +- tests/ExtendedPdoTest.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/PdoInterface.php b/src/PdoInterface.php index 6e86a687..a15f358d 100644 --- a/src/PdoInterface.php +++ b/src/PdoInterface.php @@ -186,5 +186,5 @@ public function setAttribute(int $attribute, mixed $value): bool; * @return array * */ - //public static function getAvailableDrivers(): array; + public static function getAvailableDrivers(): array; } diff --git a/tests/ExtendedPdoTest.php b/tests/ExtendedPdoTest.php index 68b331bb..463f33a1 100644 --- a/tests/ExtendedPdoTest.php +++ b/tests/ExtendedPdoTest.php @@ -741,4 +741,10 @@ public function testSetAttribute() $result = $this->pdo->setAttribute(\PDO::ATTR_CASE, \PDO::CASE_NATURAL); $this->assertTrue($result); } + + public function testGetAvailableDrivers() + { + $drivers = $this->pdo::getAvailableDrivers(); + $this->assertTrue((bool)count($drivers)); + } }