diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-18 12:03:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-18 12:03:55 +0100 |
commit | d78a4daf7e6738d9e04cb7eeb3608d6a0e6069ab (patch) | |
tree | 9d53df04c77464de7445569887a06924998a6cae /apps | |
parent | 4836a5e5367a190269cad2aa7d5fccc33d246599 (diff) | |
parent | 1e7b20f61585520b183a268662aa1b09c4f469b4 (diff) | |
download | nextcloud-server-d78a4daf7e6738d9e04cb7eeb3608d6a0e6069ab.tar.gz nextcloud-server-d78a4daf7e6738d9e04cb7eeb3608d6a0e6069ab.zip |
Merge pull request #7924 from nextcloud/dep_iappconfig
Remove deprecated function from IAppConfig
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/tests/ApiTest.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 2279155e914..8e2b5942d14 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -62,8 +62,8 @@ class ApiTest extends TestCase { protected function setUp() { parent::setUp(); - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no'); - \OC::$server->getAppConfig()->setValue('core', 'shareapi_expire_after_n_days', '7'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_expire_after_n_days', '7'); $this->folder = self::TEST_FOLDER_NAME; $this->subfolder = '/subfolder_share_api_test'; @@ -239,8 +239,8 @@ class ApiTest extends TestCase { function testEnfoceLinkPassword() { $password = md5(time()); - $appConfig = \OC::$server->getAppConfig(); - $appConfig->setValue('core', 'shareapi_enforce_links_password', 'yes'); + $config = \OC::$server->getConfig(); + $config->setAppValue('core', 'shareapi_enforce_links_password', 'yes'); $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); try { @@ -287,7 +287,7 @@ class ApiTest extends TestCase { $ocs->deleteShare($data['id']); $ocs->cleanup(); - $appConfig->setValue('core', 'shareapi_enforce_links_password', 'no'); + $config->setAppValue('core', 'shareapi_enforce_links_password', 'no'); } /** @@ -296,7 +296,7 @@ class ApiTest extends TestCase { function testSharePermissions() { // sharing file to a user should work if shareapi_exclude_groups is set // to no - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2); @@ -311,8 +311,8 @@ class ApiTest extends TestCase { $ocs->cleanup(); // exclude groups, but not the group the user belongs to. Sharing should still work - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'yes'); - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', 'admin,group1,group2'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'yes'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups_list', 'admin,group1,group2'); $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2); @@ -327,15 +327,15 @@ class ApiTest extends TestCase { $ocs->cleanup(); // now we exclude the group the user belongs to ('group'), sharing should fail now - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', 'admin,group'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups_list', 'admin,group'); $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2); $ocs->cleanup(); // cleanup - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no'); - \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups_list', ''); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); + \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups_list', ''); } |