skip teardown if cache has not been set up
This commit is contained in:
parent
c4aa3fac7e
commit
7a7b54c4a2
|
@ -151,9 +151,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