diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-16 09:27:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-16 09:27:48 +0200 |
commit | 9c328de4abaa61a19be2ffb9ff80f52cb2dcb6c3 (patch) | |
tree | fa487e118f039d1118f1fcf718f8d340293e894b /tests | |
parent | 1251df3e172ca6f92db9ebaf1e4b74a28f3652f0 (diff) | |
parent | ea4c5e6e0abb978d8cc49e604966609e97bec525 (diff) | |
download | nextcloud-server-9c328de4abaa61a19be2ffb9ff80f52cb2dcb6c3.tar.gz nextcloud-server-9c328de4abaa61a19be2ffb9ff80f52cb2dcb6c3.zip |
Merge pull request #24415 from owncloud/optimize_sharingdisabled_for_user
Optimize isSharingDisabledForUser
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 59b17b83958..87feb63888d 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -7,6 +7,7 @@ namespace Test\Files; +use OC\Cache\CappedMemoryCache; use OC\Files\Cache\Watcher; use OC\Files\Storage\Common; use OC\Files\Mount\MountPoint; @@ -269,6 +270,9 @@ class ViewTest extends \Test\TestCase { * @dataProvider sharingDisabledPermissionProvider */ public function testRemoveSharePermissionWhenSharingDisabledForUser($excludeGroups, $excludeGroupsList, $expectedShareable) { + // Reset sharing disabled for users cache + $this->invokePrivate(\OC::$server->getShareManager(), 'sharingDisabledForUsersCache', [new CappedMemoryCache()]); + $appConfig = \OC::$server->getAppConfig(); $oldExcludeGroupsFlag = $appConfig->getValue('core', 'shareapi_exclude_groups', 'no'); $oldExcludeGroupsList = $appConfig->getValue('core', 'shareapi_exclude_groups_list', ''); @@ -290,6 +294,9 @@ class ViewTest extends \Test\TestCase { $appConfig->setValue('core', 'shareapi_exclude_groups', $oldExcludeGroupsFlag); $appConfig->setValue('core', 'shareapi_exclude_groups_list', $oldExcludeGroupsList); + + // Reset sharing disabled for users cache + $this->invokePrivate(\OC::$server->getShareManager(), 'sharingDisabledForUsersCache', [new CappedMemoryCache()]); } public function testCacheIncompleteFolder() { |