diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-02 14:49:27 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-14 12:54:42 +0100 |
commit | 5d0451b84862c2c905b7d1a8d5943ac53d87f990 (patch) | |
tree | decb10a6aace33fac69064d4f401ceea4ff46cc6 /apps/files_versions | |
parent | 3ab0ccd4a253364775a2baf6b058e8f7f0d293fc (diff) | |
download | nextcloud-server-5d0451b84862c2c905b7d1a8d5943ac53d87f990.tar.gz nextcloud-server-5d0451b84862c2c905b7d1a8d5943ac53d87f990.zip |
Safe teardowns
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/tests/versions.php | 10 |
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(); |