summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/sharedstorage.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/sharedstorage.php')
-rw-r--r--apps/files_sharing/tests/sharedstorage.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/sharedstorage.php b/apps/files_sharing/tests/sharedstorage.php
index de510cf1eec..3361d2cbd12 100644
--- a/apps/files_sharing/tests/sharedstorage.php
+++ b/apps/files_sharing/tests/sharedstorage.php
@@ -47,8 +47,10 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
}
protected function tearDown() {
- $this->view->unlink($this->folder);
- $this->view->unlink($this->filename);
+ if ($this->view) {
+ $this->view->unlink($this->folder);
+ $this->view->unlink($this->filename);
+ }
\OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
@@ -85,8 +87,9 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
$this->assertFalse($user2View->is_dir($this->folder));
// delete the local folder
- $fullPath = \OC_Config::getValue('datadirectory') . '/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder';
- rmdir($fullPath);
+ /** @var \OC\Files\Storage\Storage $storage */
+ list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder');
+ $storage->rmdir($internalPath);
//enforce reload of the mount points
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);