1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Various changes:

- Fix handling of binary data and long strings
- Simplify handling of socket connections
- Fix coverage
This commit is contained in:
J. King 2019-01-15 08:58:11 -05:00
parent 6ad3fb78a0
commit e92bda5373
27 changed files with 93 additions and 52 deletions

View file

@ -53,6 +53,8 @@ class Conf {
public $dbMySQLPort = 3306; public $dbMySQLPort = 3306;
/** @var string Database name on MySQL/MariaDB database server (if using MySQL/MariaDB) */ /** @var string Database name on MySQL/MariaDB database server (if using MySQL/MariaDB) */
public $dbMySQLDb = "arsse"; public $dbMySQLDb = "arsse";
/** @var string Unix domain socket or named pipe to use for MySQL when not connecting over TCP */
public $dbMySQLSocket = "";
/** @var string Class of the user management driver in use (Internal by default) */ /** @var string Class of the user management driver in use (Internal by default) */
public $userDriver = User\Internal\Driver::class; public $userDriver = User\Internal\Driver::class;

View file

@ -28,22 +28,14 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
if (!static::requirementsMet()) { if (!static::requirementsMet()) {
throw new Exception("extMissing", static::driverName()); // @codeCoverageIgnore throw new Exception("extMissing", static::driverName()); // @codeCoverageIgnore
} }
$host = Arsse::$conf->dbMySQLHost; $host = strtolower(!strlen((string) Arsse::$conf->dbMySQLHost) ? "localhost" : Arsse::$conf->dbMySQLHost);
if ($host[0] === "/") { $socket = strlen((string) Arsse::$conf->dbMySQLSocket) ? Arsse::$conf->dbMySQLSocket : ini_get("mysqli.default_socket");
// host is a Unix socket
$socket = $host;
$host = "";
} elseif(substr($host, 0, 9) === "\\\\.\\pipe\\") {
// host is a Windows named piple
$socket = substr($host, 10);
$host = "";
}
$user = Arsse::$conf->dbMySQLUser ?? ""; $user = Arsse::$conf->dbMySQLUser ?? "";
$pass = Arsse::$conf->dbMySQLPass ?? ""; $pass = Arsse::$conf->dbMySQLPass ?? "";
$port = Arsse::$conf->dbMySQLPost ?? 3306; $port = Arsse::$conf->dbMySQLPost ?? 3306;
$db = Arsse::$conf->dbMySQLDb ?? "arsse"; $db = Arsse::$conf->dbMySQLDb ?? "arsse";
// make the connection // make the connection
$this->makeConnection($user, $pass, $db, $host, $port, $socket ?? ""); $this->makeConnection($user, $pass, $db, $host, $port, $socket);
// set session variables // set session variables
foreach (static::makeSetupQueries() as $q) { foreach (static::makeSetupQueries() as $q) {
$this->exec($q); $this->exec($q);

View file

@ -11,16 +11,12 @@ use JKingWeb\Arsse\Db\ExceptionInput;
use JKingWeb\Arsse\Db\ExceptionTimeout; use JKingWeb\Arsse\Db\ExceptionTimeout;
trait ExceptionBuilder { trait ExceptionBuilder {
protected function buildException(): array {
return self::buildEngineException($this->db->errno, $this->db->error);
}
public static function buildEngineException($code, string $msg): array { public static function buildEngineException($code, string $msg): array {
switch ($code) { switch ($code) {
case 1205: case 1205:
return [ExceptionTimeout::class, 'general', $msg]; return [ExceptionTimeout::class, 'general', $msg];
case 1364: case 1364:
return [ExceptionInput::class, "constraintViolation", $msg]; return [ExceptionInput::class, "engineConstraintViolation", $msg];
case 1366: case 1366:
return [ExceptionInput::class, 'engineTypeViolation', $msg]; return [ExceptionInput::class, 'engineTypeViolation', $msg];
default: default:

View file

@ -21,16 +21,13 @@ class PDODriver extends Driver {
} }
protected function makeConnection(string $db, string $user, string $password, string $host, int $port, string $socket) { protected function makeConnection(string $db, string $user, string $password, string $host, int $port, string $socket) {
$dsn = []; $dsn = "mysql:".implode(";", [
$dsn[] = "charset=utf8mb4"; "charset=utf8mb4",
$dsn[] = "dbname=$db"; "dbname=$db",
if (strlen($host)) { "host=$host",
$dsn[] = "host=$host"; "socket=$socket",
$dsn[] = "port=$port"; "port=$port",
} elseif (strlen($socket)) { ]);
$dsn[] = "socket=$socket";
}
$dsn = "mysql:".implode(";", $dsn);
$this->db = new \PDO($dsn, $user, $password, [ $this->db = new \PDO($dsn, $user, $password, [
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
]); ]);

View file

@ -28,6 +28,7 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
protected $packetSize; protected $packetSize;
protected $values; protected $values;
protected $longs;
protected $binds = ""; protected $binds = "";
public function __construct(\mysqli $db, string $query, array $bindings = [], int $packetSize = 4194304) { public function __construct(\mysqli $db, string $query, array $bindings = [], int $packetSize = 4194304) {
@ -39,9 +40,9 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
protected function prepare(string $query): bool { protected function prepare(string $query): bool {
$this->st = $this->db->prepare($query); $this->st = $this->db->prepare($query);
if (!$this->st) { if (!$this->st) { // @codeCoverageIgnore
list($excClass, $excMsg, $excData) = $this->buildEngineException($this->db->errno, $this->db->error); list($excClass, $excMsg, $excData) = $this->buildEngineException($this->db->errno, $this->db->error); // @codeCoverageIgnore
throw new $excClass($excMsg, $excData); throw new $excClass($excMsg, $excData); // @codeCoverageIgnore
} }
return true; return true;
} }
@ -56,16 +57,26 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
public function runArray(array $values = []): \JKingWeb\Arsse\Db\Result { public function runArray(array $values = []): \JKingWeb\Arsse\Db\Result {
$this->st->reset(); $this->st->reset();
// clear normalized values
$this->binds = "";
$this->values = [];
$this->longs = [];
// prepare values and them all at once // prepare values and them all at once
$this->bindValues($values); $this->bindValues($values);
if ($this->values) { if ($this->values) {
$this->st->bind_param($this->binds, ...$this->values); $this->st->bind_param($this->binds, ...$this->values);
} }
// packetize any large values
foreach ($this->longs as $pos => $data) {
$this->st->send_long_data($pos, $data);
unset($data);
}
// execute the statement // execute the statement
$this->st->execute(); $this->st->execute();
// clear normalized values // clear normalized values
$this->binds = ""; $this->binds = "";
$this->values = []; $this->values = [];
$this->longs = [];
// check for errors // check for errors
if ($this->st->sqlstate !== "00000") { if ($this->st->sqlstate !== "00000") {
if ($this->st->sqlstate === "HY000") { if ($this->st->sqlstate === "HY000") {
@ -85,14 +96,15 @@ class Statement extends \JKingWeb\Arsse\Db\AbstractStatement {
protected function bindValue($value, string $type, int $position): bool { protected function bindValue($value, string $type, int $position): bool {
// this is a bit of a hack: we collect values (and MySQL bind types) here so that we can take // this is a bit of a hack: we collect values (and MySQL bind types) here so that we can take
// advantage of the work done by bindValues() even though MySQL requires everything to be bound // advantage of the work done by bindValues() even though MySQL requires everything to be bound
// all at once; we also packetize large values here if necessary // all at once; we also segregate large values for later packetization
if (($type === "binary" && !is_null($value)) || (is_string($value) && strlen($value) > $this->packetSize)) { if (($type === "binary" && !is_null($value)) || (is_string($value) && strlen($value) > $this->packetSize)) {
$this->values[] = null; $this->values[] = null;
$this->st->send_long_data($position - 1, $value); $this->longs[$position - 1] = $value;
$this->binds .= "b";
} else { } else {
$this->values[] = $value; $this->values[] = $value;
}
$this->binds .= self::BINDINGS[$type]; $this->binds .= self::BINDINGS[$type];
}
return true; return true;
} }
public static function mungeQuery(string $query, array $types, ...$extraData): string { public static function mungeQuery(string $query, array $types, ...$extraData): string {

View file

@ -17,6 +17,7 @@ trait Dispatch {
} }
} }
/** @codeCoverageIgnore */
public static function buildEngineException($code, string $msg): array { public static function buildEngineException($code, string $msg): array {
// PostgreSQL uses SQLSTATE exclusively, so this is not used // PostgreSQL uses SQLSTATE exclusively, so this is not used
return []; return [];

View file

@ -11,6 +11,7 @@ class PDOStatement extends \JKingWeb\Arsse\Db\PDOStatement {
return Statement::mungeQuery($query, $types, false); return Statement::mungeQuery($query, $types, false);
} }
/** @codeCoverageIgnore */
public static function buildEngineException($code, string $msg): array { public static function buildEngineException($code, string $msg): array {
// PostgreSQL uses SQLSTATE exclusively, so this is not used // PostgreSQL uses SQLSTATE exclusively, so this is not used
return []; return [];

View file

@ -20,7 +20,7 @@ trait SQLState {
case "23000": case "23000":
case "23502": case "23502":
case "23505": case "23505":
return [ExceptionInput::class, "constraintViolation", $msg]; return [ExceptionInput::class, "engineConstraintViolation", $msg];
case "55P03": case "55P03":
case "57014": case "57014":
return [ExceptionTimeout::class, 'general', $msg]; return [ExceptionTimeout::class, 'general', $msg];

View file

@ -67,7 +67,7 @@ abstract class BaseStatement extends \JKingWeb\Arsse\Test\AbstractTest {
/** @dataProvider provideBinaryBindings */ /** @dataProvider provideBinaryBindings */
public function testHandleBinaryData($value, string $type, string $exp) { public function testHandleBinaryData($value, string $type, string $exp) {
if (in_array(static::$implementation, ["MySQL", "PostgreSQL", "PDO PostgreSQL"])) { if (in_array(static::$implementation, ["PostgreSQL", "PDO PostgreSQL"])) {
$this->markTestSkipped("Correct handling of binary data with PostgreSQL and native MySQL is currently unknown"); $this->markTestSkipped("Correct handling of binary data with PostgreSQL and native MySQL is currently unknown");
} }
if ($exp === "null") { if ($exp === "null") {

View file

@ -8,7 +8,9 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\Driver<extended> */ * @covers \JKingWeb\Arsse\Db\MySQL\Driver<extended>
* @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL;

View file

@ -11,7 +11,8 @@ use JKingWeb\Arsse\Test\DatabaseInformation;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\Result<extended> * @covers \JKingWeb\Arsse\Db\MySQL\Result<extended>
*/ * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL;

View file

@ -8,7 +8,9 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\Statement<extended> */ * @covers \JKingWeb\Arsse\Db\MySQL\Statement<extended>
* @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL;
@ -31,4 +33,16 @@ class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
return $value; return $value;
} }
} }
public function testBindLongString() {
// this test requires some set-up to be effective
static::$interface->query("CREATE TABLE arsse_test(`value` longtext not null) character set utf8mb4");
// we'll use an unrealistic packet size of 1 byte to trigger special handling for strings which are too long for the maximum packet size
$str = "long string";
$s = new \JKingWeb\Arsse\Db\MySQL\Statement(static::$interface, "INSERT INTO arsse_test values(?)", ["str"], 1);
$s->runArray([$str]);
$s = new \JKingWeb\Arsse\Db\MySQL\Statement(static::$interface, "SELECT * from arsse_test", []);
$val = $s->run()->getValue();
$this->assertSame($str, $val);
}
} }

View file

@ -8,7 +8,9 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQL;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\Driver<extended> */ * @covers \JKingWeb\Arsse\Db\MySQL\Driver<extended>
* @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL;

View file

@ -9,8 +9,10 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\MySQL\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\PDODriver * @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO;

View file

@ -11,7 +11,9 @@ use JKingWeb\Arsse\Test\DatabaseInformation;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PDOResult<extended> * @covers \JKingWeb\Arsse\Db\PDOResult<extended>
*/ * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult { class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO;

View file

@ -9,7 +9,9 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\PDOStatement<extended> * @covers \JKingWeb\Arsse\Db\MySQL\PDOStatement<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO;

View file

@ -9,7 +9,10 @@ namespace JKingWeb\Arsse\TestCase\Db\MySQLPDO;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\MySQL\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\MySQL\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\MySQL\ExceptionBuilder
* @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO;

View file

@ -9,7 +9,8 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PostgreSQL\Driver<extended> * @covers \JKingWeb\Arsse\Db\PostgreSQL\Driver<extended>
* @covers \JKingWeb\Arsse\Db\PostgreSQL\Dispatch<extended> */ * @covers \JKingWeb\Arsse\Db\PostgreSQL\Dispatch<extended>
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL;

View file

@ -9,7 +9,8 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PostgreSQL\Statement<extended> * @covers \JKingWeb\Arsse\Db\PostgreSQL\Statement<extended>
* @covers \JKingWeb\Arsse\Db\PostgreSQL\Dispatch<extended> */ * @covers \JKingWeb\Arsse\Db\PostgreSQL\Dispatch<extended>
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL;

View file

@ -8,7 +8,8 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQL;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PostgreSQL\Driver<extended> */ * @covers \JKingWeb\Arsse\Db\PostgreSQL\Driver<extended>
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQL;

View file

@ -10,7 +10,8 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO;
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PostgreSQL\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\PostgreSQL\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\PDODriver * @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO;

View file

@ -9,7 +9,8 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PostgreSQL\PDOStatement<extended> * @covers \JKingWeb\Arsse\Db\PostgreSQL\PDOStatement<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO;

View file

@ -9,7 +9,9 @@ namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO;
/** /**
* @group slow * @group slow
* @covers \JKingWeb\Arsse\Db\PostgreSQL\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\PostgreSQL\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\PostgreSQLPDO;

View file

@ -15,7 +15,8 @@ use Phake;
/** /**
* @covers \JKingWeb\Arsse\Db\SQLite3\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\SQLite3\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\PDODriver * @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest { class TestCreation extends \JKingWeb\Arsse\Test\AbstractTest {
protected $data; protected $data;
protected $drv; protected $drv;

View file

@ -9,7 +9,8 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO;
/** /**
* @covers \JKingWeb\Arsse\Db\SQLite3\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\SQLite3\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\PDODriver * @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver { class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO;

View file

@ -8,7 +8,8 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO;
/** /**
* @covers \JKingWeb\Arsse\Db\PDOStatement<extended> * @covers \JKingWeb\Arsse\Db\PDOStatement<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement { class TestStatement extends \JKingWeb\Arsse\TestCase\Db\BaseStatement {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO;

View file

@ -8,7 +8,9 @@ namespace JKingWeb\Arsse\TestCase\Db\SQLite3PDO;
/** /**
* @covers \JKingWeb\Arsse\Db\SQLite3\PDODriver<extended> * @covers \JKingWeb\Arsse\Db\SQLite3\PDODriver<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */ * @covers \JKingWeb\Arsse\Db\PDODriver
* @covers \JKingWeb\Arsse\Db\PDOError
* @covers \JKingWeb\Arsse\Db\SQLState */
class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate { class TestUpdate extends \JKingWeb\Arsse\TestCase\Db\BaseUpdate {
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO; use \JKingWeb\Arsse\TestCase\DatabaseDrivers\SQLite3PDO;