diff --git a/tests/cases/Db/MySQL/TestDatabase.php b/tests/cases/Db/MySQL/TestDatabase.php index 4e4f9c58..eaf19bb8 100644 --- a/tests/cases/Db/MySQL/TestDatabase.php +++ b/tests/cases/Db/MySQL/TestDatabase.php @@ -13,7 +13,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL; * @covers \JKingWeb\Arsse\Misc\Query */ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQL; protected function nextID(string $table): int { return (int) (static::$drv->query("SELECT (case when max(id) then max(id) else 0 end)+1 from $table")->getValue() ?? 1); diff --git a/tests/cases/Db/MySQL/TestDriver.php b/tests/cases/Db/MySQL/TestDriver.php index d3059ba6..1f8240e4 100644 --- a/tests/cases/Db/MySQL/TestDriver.php +++ b/tests/cases/Db/MySQL/TestDriver.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL; * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder * @covers \JKingWeb\Arsse\Db\SQLState */ class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQL; protected $create = "CREATE TABLE arsse_test(id bigint auto_increment primary key)"; protected $lock = ["SET lock_wait_timeout = 1", "LOCK TABLES arsse_meta WRITE"]; diff --git a/tests/cases/Db/MySQL/TestResult.php b/tests/cases/Db/MySQL/TestResult.php index 2d58aa4d..646e687e 100644 --- a/tests/cases/Db/MySQL/TestResult.php +++ b/tests/cases/Db/MySQL/TestResult.php @@ -14,7 +14,7 @@ use JKingWeb\Arsse\Test\DatabaseInformation; * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder * @covers \JKingWeb\Arsse\Db\SQLState */ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQL; protected static $createMeta = "CREATE TABLE arsse_meta(`key` varchar(255) primary key not null, value text)"; protected static $createTest = "CREATE TABLE arsse_test(id bigint auto_increment primary key)"; diff --git a/tests/cases/Db/MySQL/TestStatement.php b/tests/cases/Db/MySQL/TestStatement.php index ba07835b..4fcf2ef6 100644 --- a/tests/cases/Db/MySQL/TestStatement.php +++ b/tests/cases/Db/MySQL/TestStatement.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL; * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder * @covers \JKingWeb\Arsse\Db\SQLState */ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQL; protected function makeStatement(string $q, array $types = []): array { return [static::$interface, $q, $types]; diff --git a/tests/cases/Db/MySQL/TestUpdate.php b/tests/cases/Db/MySQL/TestUpdate.php index 09c5261f..df7808e6 100644 --- a/tests/cases/Db/MySQL/TestUpdate.php +++ b/tests/cases/Db/MySQL/TestUpdate.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL; * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder * @covers \JKingWeb\Arsse\Db\SQLState */ class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQL; protected static $minimal1 = "CREATE TABLE arsse_meta(`key` varchar(255) primary key, value text); INSERT INTO arsse_meta(`key`,value) values('schema_version','1');"; protected static $minimal2 = "UPDATE arsse_meta set value = '2' where `key` = 'schema_version';"; diff --git a/tests/cases/Db/MySQLPDO/TestDatabase.php b/tests/cases/Db/MySQLPDO/TestDatabase.php index 6409d121..1b125662 100644 --- a/tests/cases/Db/MySQLPDO/TestDatabase.php +++ b/tests/cases/Db/MySQLPDO/TestDatabase.php @@ -14,7 +14,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; * @covers \JKingWeb\Arsse\Misc\Query */ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQLPDO; protected function nextID(string $table): int { return (int) (static::$drv->query("SELECT (case when max(id) then max(id) else 0 end)+1 from $table")->getValue() ?? 1); diff --git a/tests/cases/Db/MySQLPDO/TestDriver.php b/tests/cases/Db/MySQLPDO/TestDriver.php index 3380a821..ee46ba9d 100644 --- a/tests/cases/Db/MySQLPDO/TestDriver.php +++ b/tests/cases/Db/MySQLPDO/TestDriver.php @@ -14,7 +14,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQLPDO; protected $create = "CREATE TABLE arsse_test(id bigint auto_increment primary key)"; protected $lock = ["SET lock_wait_timeout = 1", "LOCK TABLES arsse_meta WRITE"]; diff --git a/tests/cases/Db/MySQLPDO/TestResult.php b/tests/cases/Db/MySQLPDO/TestResult.php index 5c31c547..03338fba 100644 --- a/tests/cases/Db/MySQLPDO/TestResult.php +++ b/tests/cases/Db/MySQLPDO/TestResult.php @@ -15,7 +15,7 @@ use JKingWeb\Arsse\Test\DatabaseInformation; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQLPDO; protected static $createMeta = "CREATE TABLE arsse_meta(`key` varchar(255) primary key not null, value text)"; protected static $createTest = "CREATE TABLE arsse_test(id bigint auto_increment primary key)"; diff --git a/tests/cases/Db/MySQLPDO/TestStatement.php b/tests/cases/Db/MySQLPDO/TestStatement.php index 0f4572ee..a6d0706e 100644 --- a/tests/cases/Db/MySQLPDO/TestStatement.php +++ b/tests/cases/Db/MySQLPDO/TestStatement.php @@ -13,7 +13,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQLPDO; protected function makeStatement(string $q, array $types = []): array { return [static::$interface, $q, $types]; diff --git a/tests/cases/Db/MySQLPDO/TestUpdate.php b/tests/cases/Db/MySQLPDO/TestUpdate.php index e0c2e24a..8b0594eb 100644 --- a/tests/cases/Db/MySQLPDO/TestUpdate.php +++ b/tests/cases/Db/MySQLPDO/TestUpdate.php @@ -14,7 +14,7 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\MySQLPDO; protected static $minimal1 = "CREATE TABLE arsse_meta(`key` varchar(255) primary key, value text); INSERT INTO arsse_meta(`key`,value) values('schema_version','1');"; protected static $minimal2 = "UPDATE arsse_meta set value = '2' where `key` = 'schema_version';"; diff --git a/tests/cases/Db/PostgreSQL/TestDatabase.php b/tests/cases/Db/PostgreSQL/TestDatabase.php index d92c62b5..f2277afc 100644 --- a/tests/cases/Db/PostgreSQL/TestDatabase.php +++ b/tests/cases/Db/PostgreSQL/TestDatabase.php @@ -13,7 +13,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; * @covers \JKingWeb\Arsse\Misc\Query */ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQL; protected function nextID(string $table): int { return (int) static::$drv->query("SELECT coalesce(last_value, (select max(id) from $table)) + 1 from pg_sequences where sequencename = '{$table}_id_seq'")->getValue(); diff --git a/tests/cases/Db/PostgreSQL/TestDriver.php b/tests/cases/Db/PostgreSQL/TestDriver.php index 119e6c02..ee5a9ba5 100644 --- a/tests/cases/Db/PostgreSQL/TestDriver.php +++ b/tests/cases/Db/PostgreSQL/TestDriver.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; * @covers \JKingWeb\Arsse\Db\PostgreSQL\Dispatch * @covers \JKingWeb\Arsse\Db\SQLState */ class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQL; protected $create = "CREATE TABLE arsse_test(id bigserial primary key)"; protected $lock = ["BEGIN", "LOCK TABLE arsse_meta IN EXCLUSIVE MODE NOWAIT"]; diff --git a/tests/cases/Db/PostgreSQL/TestResult.php b/tests/cases/Db/PostgreSQL/TestResult.php index 23b44c89..60441765 100644 --- a/tests/cases/Db/PostgreSQL/TestResult.php +++ b/tests/cases/Db/PostgreSQL/TestResult.php @@ -13,7 +13,7 @@ use JKingWeb\Arsse\Test\DatabaseInformation; * @covers \JKingWeb\Arsse\Db\PostgreSQL\Result */ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQL; protected static $createMeta = "CREATE TABLE arsse_meta(key text primary key not null, value text)"; protected static $createTest = "CREATE TABLE arsse_test(id bigserial primary key)"; diff --git a/tests/cases/Db/PostgreSQL/TestStatement.php b/tests/cases/Db/PostgreSQL/TestStatement.php index d1818811..3e3008e8 100644 --- a/tests/cases/Db/PostgreSQL/TestStatement.php +++ b/tests/cases/Db/PostgreSQL/TestStatement.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; * @covers \JKingWeb\Arsse\Db\PostgreSQL\Dispatch * @covers \JKingWeb\Arsse\Db\SQLState */ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQL; protected function makeStatement(string $q, array $types = []): array { return [static::$interface, $q, $types]; diff --git a/tests/cases/Db/PostgreSQL/TestUpdate.php b/tests/cases/Db/PostgreSQL/TestUpdate.php index ce54eb01..0117a34c 100644 --- a/tests/cases/Db/PostgreSQL/TestUpdate.php +++ b/tests/cases/Db/PostgreSQL/TestUpdate.php @@ -11,7 +11,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL; * @covers \JKingWeb\Arsse\Db\PostgreSQL\Driver * @covers \JKingWeb\Arsse\Db\SQLState */ class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQL; protected static $minimal1 = "CREATE TABLE arsse_meta(key text primary key, value text); INSERT INTO arsse_meta(key,value) values('schema_version','1');"; protected static $minimal2 = "UPDATE arsse_meta set value = '2' where key = 'schema_version';"; diff --git a/tests/cases/Db/PostgreSQLPDO/TestDatabase.php b/tests/cases/Db/PostgreSQLPDO/TestDatabase.php index d6192d6d..810c13c7 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestDatabase.php +++ b/tests/cases/Db/PostgreSQLPDO/TestDatabase.php @@ -14,7 +14,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; * @covers \JKingWeb\Arsse\Misc\Query */ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQLPDO; protected function nextID(string $table): int { return (int) static::$drv->query("SELECT coalesce(last_value, (select max(id) from $table)) + 1 from pg_sequences where sequencename = '{$table}_id_seq'")->getValue(); diff --git a/tests/cases/Db/PostgreSQLPDO/TestDriver.php b/tests/cases/Db/PostgreSQLPDO/TestDriver.php index 58b793f3..b87828cb 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestDriver.php +++ b/tests/cases/Db/PostgreSQLPDO/TestDriver.php @@ -13,7 +13,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQLPDO; protected $create = "CREATE TABLE arsse_test(id bigserial primary key)"; protected $lock = ["BEGIN", "LOCK TABLE arsse_meta IN EXCLUSIVE MODE NOWAIT"]; diff --git a/tests/cases/Db/PostgreSQLPDO/TestResult.php b/tests/cases/Db/PostgreSQLPDO/TestResult.php index 2877ddef..d2e2e8dc 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestResult.php +++ b/tests/cases/Db/PostgreSQLPDO/TestResult.php @@ -13,7 +13,7 @@ use JKingWeb\Arsse\Test\DatabaseInformation; * @covers \JKingWeb\Arsse\Db\PDOResult */ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQLPDO; protected static $createMeta = "CREATE TABLE arsse_meta(key text primary key not null, value text)"; protected static $createTest = "CREATE TABLE arsse_test(id bigserial primary key)"; diff --git a/tests/cases/Db/PostgreSQLPDO/TestStatement.php b/tests/cases/Db/PostgreSQLPDO/TestStatement.php index 7730dc8a..926df768 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestStatement.php +++ b/tests/cases/Db/PostgreSQLPDO/TestStatement.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQLPDO; protected function makeStatement(string $q, array $types = []): array { return [static::$interface, $q, $types]; diff --git a/tests/cases/Db/PostgreSQLPDO/TestUpdate.php b/tests/cases/Db/PostgreSQLPDO/TestUpdate.php index c7cba921..e3278094 100644 --- a/tests/cases/Db/PostgreSQLPDO/TestUpdate.php +++ b/tests/cases/Db/PostgreSQLPDO/TestUpdate.php @@ -13,7 +13,7 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQLPDO; protected static $minimal1 = "CREATE TABLE arsse_meta(key text primary key, value text); INSERT INTO arsse_meta(key,value) values('schema_version','1');"; protected static $minimal2 = "UPDATE arsse_meta set value = '2' where key = 'schema_version';"; diff --git a/tests/cases/Db/SQLite3/TestDatabase.php b/tests/cases/Db/SQLite3/TestDatabase.php index f67d545a..3fb11399 100644 --- a/tests/cases/Db/SQLite3/TestDatabase.php +++ b/tests/cases/Db/SQLite3/TestDatabase.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3; * @covers \JKingWeb\Arsse\Misc\Query */ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3; protected function nextID(string $table): int { return static::$drv->query("SELECT (case when max(id) then max(id) else 0 end)+1 from $table")->getValue(); diff --git a/tests/cases/Db/SQLite3/TestDriver.php b/tests/cases/Db/SQLite3/TestDriver.php index e1671b9d..03ddf5ae 100644 --- a/tests/cases/Db/SQLite3/TestDriver.php +++ b/tests/cases/Db/SQLite3/TestDriver.php @@ -10,7 +10,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3; * @covers \JKingWeb\Arsse\Db\SQLite3\Driver * @covers \JKingWeb\Arsse\Db\SQLite3\ExceptionBuilder */ class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3; protected $create = "CREATE TABLE arsse_test(id integer primary key)"; protected $lock = "BEGIN EXCLUSIVE TRANSACTION"; diff --git a/tests/cases/Db/SQLite3/TestResult.php b/tests/cases/Db/SQLite3/TestResult.php index 74fd2938..298271a2 100644 --- a/tests/cases/Db/SQLite3/TestResult.php +++ b/tests/cases/Db/SQLite3/TestResult.php @@ -12,7 +12,7 @@ use JKingWeb\Arsse\Test\DatabaseInformation; * @covers \JKingWeb\Arsse\Db\SQLite3\Result */ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3; protected static $createMeta = "CREATE TABLE arsse_meta(key text primary key not null, value text) without rowid"; protected static $createTest = "CREATE TABLE arsse_test(id integer primary key)"; diff --git a/tests/cases/Db/SQLite3/TestStatement.php b/tests/cases/Db/SQLite3/TestStatement.php index afd5902b..f86ac7f4 100644 --- a/tests/cases/Db/SQLite3/TestStatement.php +++ b/tests/cases/Db/SQLite3/TestStatement.php @@ -10,7 +10,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3; * @covers \JKingWeb\Arsse\Db\SQLite3\Statement * @covers \JKingWeb\Arsse\Db\SQLite3\ExceptionBuilder */ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3; public static function tearDownAfterClass() { static::$interface->close(); diff --git a/tests/cases/Db/SQLite3/TestUpdate.php b/tests/cases/Db/SQLite3/TestUpdate.php index 311c45c0..26e99093 100644 --- a/tests/cases/Db/SQLite3/TestUpdate.php +++ b/tests/cases/Db/SQLite3/TestUpdate.php @@ -10,7 +10,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3; * @covers \JKingWeb\Arsse\Db\SQLite3\Driver * @covers \JKingWeb\Arsse\Db\SQLite3\ExceptionBuilder */ class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3; protected static $minimal1 = "create table arsse_meta(key text primary key not null, value text); pragma user_version=1"; protected static $minimal2 = "pragma user_version=2"; diff --git a/tests/cases/Db/SQLite3PDO/TestDatabase.php b/tests/cases/Db/SQLite3PDO/TestDatabase.php index 782b79e5..504775e7 100644 --- a/tests/cases/Db/SQLite3PDO/TestDatabase.php +++ b/tests/cases/Db/SQLite3PDO/TestDatabase.php @@ -11,7 +11,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; * @covers \JKingWeb\Arsse\Misc\Query */ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3PDO; protected function nextID(string $table): int { return (int) static::$drv->query("SELECT (case when max(id) then max(id) else 0 end)+1 from $table")->getValue(); diff --git a/tests/cases/Db/SQLite3PDO/TestDriver.php b/tests/cases/Db/SQLite3PDO/TestDriver.php index def1e82e..4c6f7155 100644 --- a/tests/cases/Db/SQLite3PDO/TestDriver.php +++ b/tests/cases/Db/SQLite3PDO/TestDriver.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3PDO; protected $create = "CREATE TABLE arsse_test(id integer primary key)"; protected $lock = "BEGIN EXCLUSIVE TRANSACTION"; diff --git a/tests/cases/Db/SQLite3PDO/TestResult.php b/tests/cases/Db/SQLite3PDO/TestResult.php index b33e39d7..4636dab2 100644 --- a/tests/cases/Db/SQLite3PDO/TestResult.php +++ b/tests/cases/Db/SQLite3PDO/TestResult.php @@ -12,7 +12,7 @@ use JKingWeb\Arsse\Test\DatabaseInformation; * @covers \JKingWeb\Arsse\Db\PDOResult */ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3PDO; protected static $createMeta = "CREATE TABLE arsse_meta(key text primary key not null, value text) without rowid"; protected static $createTest = "CREATE TABLE arsse_test(id integer primary key)"; diff --git a/tests/cases/Db/SQLite3PDO/TestStatement.php b/tests/cases/Db/SQLite3PDO/TestStatement.php index e25b6617..2229a5d5 100644 --- a/tests/cases/Db/SQLite3PDO/TestStatement.php +++ b/tests/cases/Db/SQLite3PDO/TestStatement.php @@ -11,7 +11,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3PDO; protected function makeStatement(string $q, array $types = []): array { return [static::$interface, $q, $types]; diff --git a/tests/cases/Db/SQLite3PDO/TestUpdate.php b/tests/cases/Db/SQLite3PDO/TestUpdate.php index 33904e71..964dc2d9 100644 --- a/tests/cases/Db/SQLite3PDO/TestUpdate.php +++ b/tests/cases/Db/SQLite3PDO/TestUpdate.php @@ -12,7 +12,7 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO; * @covers \JKingWeb\Arsse\Db\PDOError * @covers \JKingWeb\Arsse\Db\SQLState */ class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { - use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; + use \JKingWeb\Arsse\Test\DatabaseDrivers\SQLite3PDO; protected static $minimal1 = "create table arsse_meta(key text primary key not null, value text); pragma user_version=1"; protected static $minimal2 = "pragma user_version=2"; diff --git a/tests/cases/DatabaseDrivers/MySQL.php b/tests/lib/DatabaseDrivers/MySQL.php similarity index 98% rename from tests/cases/DatabaseDrivers/MySQL.php rename to tests/lib/DatabaseDrivers/MySQL.php index 3d14d2eb..048266d4 100644 --- a/tests/cases/DatabaseDrivers/MySQL.php +++ b/tests/lib/DatabaseDrivers/MySQL.php @@ -4,7 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); -namespace JKingWeb\Arsse\TestCase\DatabaseDrivers; +namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/cases/DatabaseDrivers/MySQLPDO.php b/tests/lib/DatabaseDrivers/MySQLPDO.php similarity index 97% rename from tests/cases/DatabaseDrivers/MySQLPDO.php rename to tests/lib/DatabaseDrivers/MySQLPDO.php index def124dd..2499e5d9 100644 --- a/tests/cases/DatabaseDrivers/MySQLPDO.php +++ b/tests/lib/DatabaseDrivers/MySQLPDO.php @@ -4,7 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); -namespace JKingWeb\Arsse\TestCase\DatabaseDrivers; +namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/cases/DatabaseDrivers/PostgreSQL.php b/tests/lib/DatabaseDrivers/PostgreSQL.php similarity index 98% rename from tests/cases/DatabaseDrivers/PostgreSQL.php rename to tests/lib/DatabaseDrivers/PostgreSQL.php index 53791ea1..c03070ed 100644 --- a/tests/cases/DatabaseDrivers/PostgreSQL.php +++ b/tests/lib/DatabaseDrivers/PostgreSQL.php @@ -4,7 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); -namespace JKingWeb\Arsse\TestCase\DatabaseDrivers; +namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/cases/DatabaseDrivers/PostgreSQLPDO.php b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php similarity index 95% rename from tests/cases/DatabaseDrivers/PostgreSQLPDO.php rename to tests/lib/DatabaseDrivers/PostgreSQLPDO.php index d3342762..f275e70e 100644 --- a/tests/cases/DatabaseDrivers/PostgreSQLPDO.php +++ b/tests/lib/DatabaseDrivers/PostgreSQLPDO.php @@ -4,10 +4,9 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); -namespace JKingWeb\Arsse\TestCase\DatabaseDrivers; +namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; -use JKingWeb\Arsse\Db\Driver; trait PostgreSQLPDO { protected static $implementation = "PDO PostgreSQL"; diff --git a/tests/cases/DatabaseDrivers/SQLite3.php b/tests/lib/DatabaseDrivers/SQLite3.php similarity index 98% rename from tests/cases/DatabaseDrivers/SQLite3.php rename to tests/lib/DatabaseDrivers/SQLite3.php index 880539a3..a3e23580 100644 --- a/tests/cases/DatabaseDrivers/SQLite3.php +++ b/tests/lib/DatabaseDrivers/SQLite3.php @@ -4,7 +4,7 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); -namespace JKingWeb\Arsse\TestCase\DatabaseDrivers; +namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Db\Driver; diff --git a/tests/cases/DatabaseDrivers/SQLite3PDO.php b/tests/lib/DatabaseDrivers/SQLite3PDO.php similarity index 94% rename from tests/cases/DatabaseDrivers/SQLite3PDO.php rename to tests/lib/DatabaseDrivers/SQLite3PDO.php index 15986506..7f5d2a04 100644 --- a/tests/cases/DatabaseDrivers/SQLite3PDO.php +++ b/tests/lib/DatabaseDrivers/SQLite3PDO.php @@ -4,10 +4,9 @@ * See LICENSE and AUTHORS files for details */ declare(strict_types=1); -namespace JKingWeb\Arsse\TestCase\DatabaseDrivers; +namespace JKingWeb\Arsse\Test\DatabaseDrivers; use JKingWeb\Arsse\Arsse; -use JKingWeb\Arsse\Db\Driver; trait SQLite3PDO { protected static $implementation = "PDO SQLite 3";