diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-20 11:41:07 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-20 11:41:07 +0200 |
commit | 7a7b54c4a215e044e1d984968c0f92c73bec09b7 (patch) | |
tree | 194516242f499793e340661a551d1372cec24326 /tests | |
parent | c4aa3fac7ee2c5d687423c74b0393a88fa9bbc9d (diff) | |
download | nextcloud-server-7a7b54c4a215e044e1d984968c0f92c73bec09b7.tar.gz nextcloud-server-7a7b54c4a215e044e1d984968c0f92c73bec09b7.zip |
skip teardown if cache has not been set up
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/cache/scanner.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php index 3dacefa2b80..0e3aaa2d76f 100644 --- a/tests/lib/files/cache/scanner.php +++ b/tests/lib/files/cache/scanner.php @@ -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(); + } } } |