summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-12-02 14:49:27 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-14 12:54:42 +0100
commit5d0451b84862c2c905b7d1a8d5943ac53d87f990 (patch)
treedecb10a6aace33fac69064d4f401ceea4ff46cc6 /apps/files_versions
parent3ab0ccd4a253364775a2baf6b058e8f7f0d293fc (diff)
downloadnextcloud-server-5d0451b84862c2c905b7d1a8d5943ac53d87f990.tar.gz
nextcloud-server-5d0451b84862c2c905b7d1a8d5943ac53d87f990.zip
Safe teardowns
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/tests/versions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_versions/tests/versions.php b/apps/files_versions/tests/versions.php
index 74d6006cfd9..ac922b74b9f 100644
--- a/apps/files_versions/tests/versions.php
+++ b/apps/files_versions/tests/versions.php
@@ -86,10 +86,12 @@ class Test_Files_Versioning extends \Test\TestCase {
}
protected function tearDown() {
- $this->rootView->deleteAll(self::TEST_VERSIONS_USER . '/files/');
- $this->rootView->deleteAll(self::TEST_VERSIONS_USER2 . '/files/');
- $this->rootView->deleteAll(self::TEST_VERSIONS_USER . '/files_versions/');
- $this->rootView->deleteAll(self::TEST_VERSIONS_USER2 . '/files_versions/');
+ if ($this->rootView) {
+ $this->rootView->deleteAll(self::TEST_VERSIONS_USER . '/files/');
+ $this->rootView->deleteAll(self::TEST_VERSIONS_USER2 . '/files/');
+ $this->rootView->deleteAll(self::TEST_VERSIONS_USER . '/files_versions/');
+ $this->rootView->deleteAll(self::TEST_VERSIONS_USER2 . '/files_versions/');
+ }
\OC_Hook::clear();