Commit 2709244a authored by Thomas Müller's avatar Thomas Müller
Browse files

Only perform tearDown operations on the database if we have a connection to it .....

parent 8f6a257f
......@@ -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');
$queryBuilder = \OC::$server->getDatabaseConnection()->getQueryBuilder();
if (\OC::$server->getDatabaseConnection()) {
$queryBuilder = \OC::$server->getDatabaseConnection()->getQueryBuilder();
self::tearDownAfterClassCleanShares($queryBuilder);
self::tearDownAfterClassCleanStorages($queryBuilder);
self::tearDownAfterClassCleanFileCache($queryBuilder);
self::tearDownAfterClassCleanShares($queryBuilder);
self::tearDownAfterClassCleanStorages($queryBuilder);
self::tearDownAfterClassCleanFileCache($queryBuilder);
}
self::tearDownAfterClassCleanStrayDataFiles($dataDir);
self::tearDownAfterClassCleanStrayHooks();
self::tearDownAfterClassCleanStrayLocks();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment