Skip to content

Commit

Permalink
re-add PdoInterface::getAvailableDrivers() and add a test for this me…
Browse files Browse the repository at this point in the history
…thod.
  • Loading branch information
srjlewis committed Nov 7, 2021
1 parent e324cc0 commit fcd128a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/PdoInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,5 +186,5 @@ public function setAttribute(int $attribute, mixed $value): bool;
* @return array
*
*/
//public static function getAvailableDrivers(): array;
public static function getAvailableDrivers(): array;
}
6 changes: 6 additions & 0 deletions tests/ExtendedPdoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit fcd128a

Please sign in to comment.