Skip to content

Commit

Permalink
skip teardown if cache has not been set up
Browse files Browse the repository at this point in the history
  • Loading branch information
butonic committed Jun 20, 2013
1 parent c4aa3fa commit 7a7b54c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/lib/files/cache/scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ function setUp() {
}

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 comments on commit 7a7b54c

Please sign in to comment.