summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-17 21:14:09 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-17 21:41:57 +0100
commit1e7b20f61585520b183a268662aa1b09c4f469b4 (patch)
treea0088dd7fb996e8af4fb42f7b5d976c3d3995ee6 /apps/files_sharing/tests
parent09f8a755ec6897eb72aa1da4eff623807201623d (diff)
downloadnextcloud-server-1e7b20f61585520b183a268662aa1b09c4f469b4.tar.gz
nextcloud-server-1e7b20f61585520b183a268662aa1b09c4f469b4.zip
Remove IAppConfig::setValue
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/ApiTest.php22
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', '');
}