Merge pull request #3796 from owncloud/gracefully_handle_teardown_in_scanner_test
skip teardown if cache has not been set up
This commit is contained in:
commit
59d3c5a575
|
@ -172,9 +172,11 @@ class Scanner extends \PHPUnit_Framework_TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
function tearDown() {
|
function tearDown() {
|
||||||
$ids = $this->cache->getAll();
|
if ($this->cache) {
|
||||||
$permissionsCache = $this->storage->getPermissionsCache();
|
$ids = $this->cache->getAll();
|
||||||
$permissionsCache->removeMultiple($ids, \OC_User::getUser());
|
$permissionsCache = $this->storage->getPermissionsCache();
|
||||||
$this->cache->clear();
|
$permissionsCache->removeMultiple($ids, \OC_User::getUser());
|
||||||
|
$this->cache->clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue