diff --git a/lib/Database.php b/lib/Database.php index b50f0409..4036f91d 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -78,21 +78,6 @@ class Database { return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2]['function']; } - /** Lists the available database drivers, as an associative array with - * fully-qualified class names as keys, and human-readable descriptions as values - */ - public static function driverList(): array { - $sep = \DIRECTORY_SEPARATOR; - $path = __DIR__.$sep."Db".$sep; - $classes = []; - foreach (glob($path."*".$sep."Driver.php") as $file) { - $name = basename(dirname($file)); - $class = NS_BASE."Db\\$name\\Driver"; - $classes[$class] = $class::driverName(); - } - return $classes; - } - /** Returns the current (actual) schema version of the database; compared against self::SCHEMA_VERSION to know when an upgrade is required */ public function driverSchemaVersion(): int { return $this->db->schemaVersion(); diff --git a/lib/Service.php b/lib/Service.php index 93d4e9ba..aed35c77 100644 --- a/lib/Service.php +++ b/lib/Service.php @@ -20,18 +20,6 @@ class Service { /** @var \DateInterval */ protected $interval; - public static function driverList(): array { - $sep = \DIRECTORY_SEPARATOR; - $path = __DIR__.$sep."Service".$sep; - $classes = []; - foreach (glob($path."*".$sep."Driver.php") as $file) { - $name = basename(dirname($file)); - $class = NS_BASE."User\\$name\\Driver"; - $classes[$class] = $class::driverName(); - } - return $classes; - } - public function __construct() { $driver = Arsse::$conf->serviceDriver; $this->drv = new $driver(); diff --git a/lib/User.php b/lib/User.php index 691d6faf..713f17c3 100644 --- a/lib/User.php +++ b/lib/User.php @@ -20,18 +20,6 @@ class User { */ protected $u; - public static function driverList(): array { - $sep = \DIRECTORY_SEPARATOR; - $path = __DIR__.$sep."User".$sep; - $classes = []; - foreach (glob($path."*".$sep."Driver.php") as $file) { - $name = basename(dirname($file)); - $class = NS_BASE."User\\$name\\Driver"; - $classes[$class] = $class::driverName(); - } - return $classes; - } - public function __construct(\JKingWeb\Arsse\User\Driver $driver = null) { $this->u = $driver ?? new Arsse::$conf->userDriver; } diff --git a/tests/cases/Database/SeriesMiscellany.php b/tests/cases/Database/SeriesMiscellany.php index a7591bbe..e91b83b3 100644 --- a/tests/cases/Database/SeriesMiscellany.php +++ b/tests/cases/Database/SeriesMiscellany.php @@ -19,13 +19,6 @@ trait SeriesMiscellany { protected function tearDownSeriesMiscellany() { } - public function testListDrivers() { - $exp = [ - 'JKingWeb\\Arsse\\Db\\SQLite3\\Driver' => Arsse::$lang->msg("Driver.Db.SQLite3.Name"), - ]; - $this->assertArraySubset($exp, Database::driverList()); - } - public function testInitializeDatabase() { static::dbRaze(static::$drv); $d = new Database(true); diff --git a/tests/cases/User/TestUser.php b/tests/cases/User/TestUser.php index 1398b177..49fc4723 100644 --- a/tests/cases/User/TestUser.php +++ b/tests/cases/User/TestUser.php @@ -24,13 +24,6 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest { $this->drv = \Phake::mock(Driver::class); } - public function testListDrivers() { - $exp = [ - 'JKingWeb\\Arsse\\User\\Internal\\Driver' => Arsse::$lang->msg("Driver.User.Internal.Name"), - ]; - $this->assertArraySubset($exp, User::driverList()); - } - public function testConstruct() { $this->assertInstanceOf(User::class, new User($this->drv)); $this->assertInstanceOf(User::class, new User);