diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-06-20 04:07:33 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-06-20 04:07:33 -0700 |
commit | 59d3c5a57507e21ddae7e0c66d5f7f52b68ccb2a (patch) | |
tree | 6e80a22ad695f95299a20185dc5cb133d353909c /tests | |
parent | 4232ccbc6d96291093e6535f3422920377ba486d (diff) | |
parent | 7a7b54c4a215e044e1d984968c0f92c73bec09b7 (diff) | |
download | nextcloud-server-59d3c5a57507e21ddae7e0c66d5f7f52b68ccb2a.tar.gz nextcloud-server-59d3c5a57507e21ddae7e0c66d5f7f52b68ccb2a.zip |
Merge pull request #3796 from owncloud/gracefully_handle_teardown_in_scanner_test
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 e93c51441b1..042bf8991f6 100644 --- a/tests/lib/files/cache/scanner.php +++ b/tests/lib/files/cache/scanner.php @@ -172,9 +172,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(); + } } } |