2018-11-23 04:18:20 +00:00
|
|
|
<?php
|
|
|
|
/** @license MIT
|
|
|
|
* Copyright 2017 J. King, Dustin Wilson et al.
|
|
|
|
* See LICENSE and AUTHORS files for details */
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2021-04-14 15:17:01 +00:00
|
|
|
|
2018-12-12 17:42:40 +00:00
|
|
|
namespace JKingWeb\Arsse\TestCase\Db\PostgreSQLPDO;
|
2018-11-23 04:18:20 +00:00
|
|
|
|
|
|
|
/**
|
2018-12-10 17:39:09 +00:00
|
|
|
* @group slow
|
2018-11-23 04:18:20 +00:00
|
|
|
* @covers \JKingWeb\Arsse\Db\PostgreSQL\PDODriver<extended>
|
|
|
|
* @covers \JKingWeb\Arsse\Db\PDODriver
|
2019-01-15 13:58:11 +00:00
|
|
|
* @covers \JKingWeb\Arsse\Db\PDOError
|
|
|
|
* @covers \JKingWeb\Arsse\Db\SQLState */
|
2018-11-23 04:18:20 +00:00
|
|
|
class TestDriver extends \JKingWeb\Arsse\TestCase\Db\BaseDriver {
|
2019-08-25 17:19:11 +00:00
|
|
|
use \JKingWeb\Arsse\Test\DatabaseDrivers\PostgreSQLPDO;
|
2019-01-12 17:43:06 +00:00
|
|
|
|
2018-11-23 04:18:20 +00:00
|
|
|
protected $create = "CREATE TABLE arsse_test(id bigserial primary key)";
|
2018-11-27 22:16:00 +00:00
|
|
|
protected $lock = ["BEGIN", "LOCK TABLE arsse_meta IN EXCLUSIVE MODE NOWAIT"];
|
2018-11-23 04:18:20 +00:00
|
|
|
protected $setVersion = "UPDATE arsse_meta set value = '#' where key = 'schema_version'";
|
2018-11-27 22:16:00 +00:00
|
|
|
|
2019-10-16 18:42:43 +00:00
|
|
|
public function tearDown(): void {
|
2018-11-27 22:16:00 +00:00
|
|
|
try {
|
|
|
|
$this->drv->exec("ROLLBACK");
|
|
|
|
} catch (\Throwable $e) {
|
|
|
|
}
|
|
|
|
parent::tearDown();
|
|
|
|
}
|
2018-11-23 04:18:20 +00:00
|
|
|
}
|