The clean & modern RSS server that doesn't give you any crap.
https://thearsse.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
51 lines
1.5 KiB
<?php
|
|
/** @license MIT
|
|
* Copyright 2017 J. King, Dustin Wilson et al.
|
|
* See LICENSE and AUTHORS files for details */
|
|
|
|
declare(strict_types=1);
|
|
namespace JKingWeb\Arsse\TestCase\Database;
|
|
|
|
use JKingWeb\Arsse\Arsse;
|
|
use JKingWeb\Arsse\Database;
|
|
|
|
trait SeriesMiscellany {
|
|
protected function setUpSeriesMiscellany() {
|
|
static::setConf([
|
|
'dbDriver' => static::$dbDriverClass,
|
|
]);
|
|
}
|
|
|
|
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);
|
|
$this->assertSame(Database::SCHEMA_VERSION, $d->driverSchemaVersion());
|
|
}
|
|
|
|
public function testManuallyInitializeDatabase() {
|
|
static::dbRaze(static::$drv);
|
|
$d = new Database(false);
|
|
$this->assertSame(0, $d->driverSchemaVersion());
|
|
$this->assertTrue($d->driverSchemaUpdate());
|
|
$this->assertSame(Database::SCHEMA_VERSION, $d->driverSchemaVersion());
|
|
$this->assertFalse($d->driverSchemaUpdate());
|
|
}
|
|
|
|
public function testCheckCharacterSetAcceptability() {
|
|
$this->assertInternalType("bool", Arsse::$db->driverCharsetAcceptable());
|
|
}
|
|
|
|
public function testPerformMaintenance() {
|
|
$this->assertTrue(Arsse::$db->driverMaintenance());
|
|
}
|
|
}
|
|
|