mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2025-01-03 14:32:40 +00:00
Fix test errors when PostgreSQL or MySQL are not available
This commit is contained in:
parent
fe008d4343
commit
94314f3e6d
2 changed files with 7 additions and 5 deletions
|
@ -102,10 +102,12 @@ abstract class Base extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function tearDownAfterClass() {
|
public static function tearDownAfterClass() {
|
||||||
// wipe the database absolutely clean
|
if (static::$drv) {
|
||||||
static::dbRaze(static::$drv);
|
// wipe the database absolutely clean
|
||||||
// clean up
|
static::dbRaze(static::$drv);
|
||||||
static::$drv = null;
|
// clean up
|
||||||
|
static::$drv = null;
|
||||||
|
}
|
||||||
static::$failureReason = "";
|
static::$failureReason = "";
|
||||||
static::clearData();
|
static::clearData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ trait MySQL {
|
||||||
protected static $stringOutput = true;
|
protected static $stringOutput = true;
|
||||||
|
|
||||||
public static function dbInterface() {
|
public static function dbInterface() {
|
||||||
$d = new \mysqli(Arsse::$conf->dbMySQLHost, Arsse::$conf->dbMySQLUser, Arsse::$conf->dbMySQLPass, Arsse::$conf->dbMySQLDb, Arsse::$conf->dbMySQLPort);
|
$d = @new \mysqli(Arsse::$conf->dbMySQLHost, Arsse::$conf->dbMySQLUser, Arsse::$conf->dbMySQLPass, Arsse::$conf->dbMySQLDb, Arsse::$conf->dbMySQLPort);
|
||||||
if ($d->connect_errno) {
|
if ($d->connect_errno) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue