skip teardown if cache has not been set up
This commit is contained in:
parent
c4aa3fac7e
commit
7a7b54c4a2
1 changed files with 6 additions and 4 deletions
10
tests/lib/files/cache/scanner.php
vendored
10
tests/lib/files/cache/scanner.php
vendored
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue