mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Fix test errors when PostgreSQL or MySQL are not available
This commit is contained in:
parent
e2cba68c1b
commit
86d52c8ff9
2 changed files with 7 additions and 5 deletions
|
@ -100,10 +100,12 @@ abstract class Base extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
}
|
||||
|
||||
public static function tearDownAfterClass() {
|
||||
// wipe the database absolutely clean
|
||||
static::dbRaze(static::$drv);
|
||||
// clean up
|
||||
static::$drv = null;
|
||||
if (static::$drv) {
|
||||
// wipe the database absolutely clean
|
||||
static::dbRaze(static::$drv);
|
||||
// clean up
|
||||
static::$drv = null;
|
||||
}
|
||||
static::$failureReason = "";
|
||||
static::clearData();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ trait MySQL {
|
|||
protected static $stringOutput = true;
|
||||
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue