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() {
|
||||
$ids = $this->cache->getAll();
|
||||
$permissionsCache = $this->storage->getPermissionsCache();
|
||||
$permissionsCache->removeMultiple($ids, \OC_User::getUser());
|
||||
$this->cache->clear();
|
||||
if ($this->cache) {
|
||||
$ids = $this->cache->getAll();
|
||||
$permissionsCache = $this->storage->getPermissionsCache();
|
||||
$permissionsCache->removeMultiple($ids, \OC_User::getUser());
|
||||
$this->cache->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue