summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-03-27 14:57:56 +0100
committerRobin Appelman <icewind@owncloud.com>2015-04-27 14:07:15 +0200
commit19486837b2bc135a8f083ff97d477eb5d6314d42 (patch)
treeb904eecf1543397f28cf3f6d07107e86410eacaf /apps
parentbe55a9032380629756e35ea4cf13fd34a213db41 (diff)
downloadnextcloud-server-19486837b2bc135a8f083ff97d477eb5d6314d42.tar.gz
nextcloud-server-19486837b2bc135a8f083ff97d477eb5d6314d42.zip
adjust test
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/cache.php4
-rw-r--r--apps/files_sharing/tests/sharedstorage.php5
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/cache.php
index 882c8afadc3..7e7e5ee26d5 100644
--- a/apps/files_sharing/tests/cache.php
+++ b/apps/files_sharing/tests/cache.php
@@ -113,7 +113,9 @@ class Test_Files_Sharing_Cache extends TestCase {
}
protected function tearDown() {
- $this->sharedCache->clear();
+ if($this->sharedCache) {
+ $this->sharedCache->clear();
+ }
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
diff --git a/apps/files_sharing/tests/sharedstorage.php b/apps/files_sharing/tests/sharedstorage.php
index a1469a74687..7c28d0431e1 100644
--- a/apps/files_sharing/tests/sharedstorage.php
+++ b/apps/files_sharing/tests/sharedstorage.php
@@ -368,7 +368,10 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase {
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
$this->assertTrue($rootView->file_exists('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/' . $this->folder));
- OC_Hook::emit('OC_Filesystem', 'setup', array('user' => self::TEST_FILES_SHARING_API_USER3, 'user_dir' => \OC_User::getHome(self::TEST_FILES_SHARING_API_USER3)));
+
+ $mountConfigManager = \OC::$server->getMountProviderCollection();
+ $mounts = $mountConfigManager->getMountsForUser(\OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER3));
+ array_walk($mounts, array(\OC\Files\Filesystem::getMountManager(), 'addMount'));
$this->assertTrue($rootView->file_exists('/' . self::TEST_FILES_SHARING_API_USER3 . '/files/' . $this->filename));