Skip to content
Snippets Groups Projects
Commit 7a7b54c4 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

skip teardown if cache has not been set up

parent c4aa3fac
Branches
No related tags found
No related merge requests found
......@@ -151,9 +151,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();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment