Only perform tearDown operations on the database if we have a connection to it .....
This commit is contained in:
parent
8f6a257f1b
commit
2709244acd
|
@ -156,11 +156,13 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
|
|||
|
||||
public static function tearDownAfterClass() {
|
||||
$dataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest');
|
||||
if (\OC::$server->getDatabaseConnection()) {
|
||||
$queryBuilder = \OC::$server->getDatabaseConnection()->getQueryBuilder();
|
||||
|
||||
self::tearDownAfterClassCleanShares($queryBuilder);
|
||||
self::tearDownAfterClassCleanStorages($queryBuilder);
|
||||
self::tearDownAfterClassCleanFileCache($queryBuilder);
|
||||
}
|
||||
self::tearDownAfterClassCleanStrayDataFiles($dataDir);
|
||||
self::tearDownAfterClassCleanStrayHooks();
|
||||
self::tearDownAfterClassCleanStrayLocks();
|
||||
|
|
Loading…
Reference in New Issue