summaryrefslogtreecommitdiffstats
path: root/tests/lib/cache/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/cache/file.php')
-rw-r--r--tests/lib/cache/file.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php
index 0880e7e1282..92b784bf8ea 100644
--- a/tests/lib/cache/file.php
+++ b/tests/lib/cache/file.php
@@ -87,7 +87,9 @@ class FileCache extends \Test_Cache {
}
protected function tearDown() {
- $this->instance->remove('hack', 'hack');
+ if ($this->instance) {
+ $this->instance->remove('hack', 'hack');
+ }
\OC_User::setUserId($this->user);
\OC::$server->getConfig()->setSystemValue('cachedirectory', $this->datadir);