diff --git a/apps/files_sharing/tests/watcher.php b/apps/files_sharing/tests/watcher.php index a2e440069a4..4af5de6aaae 100644 --- a/apps/files_sharing/tests/watcher.php +++ b/apps/files_sharing/tests/watcher.php @@ -76,7 +76,9 @@ class Test_Files_Sharing_Watcher extends OCA\Files_sharing\Tests\TestCase { } protected function tearDown() { - $this->sharedCache->clear(); + if ($this->sharedCache) { + $this->sharedCache->clear(); + } self::loginHelper(self::TEST_FILES_SHARING_API_USER1);