summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-12-17 11:12:37 +0100
committerMorris Jobke <hey@morrisjobke.de>2014-12-17 11:12:37 +0100
commitd41082f4d625ae5aa053e6f038fa498517e45ef0 (patch)
tree5d8dd7c9e8699daa4a7dbf57fa2fe57bc444a83f /apps/files_sharing/tests
parent5b9c453071fe900529cd26b88fbc681d8b153b43 (diff)
downloadnextcloud-server-d41082f4d625ae5aa053e6f038fa498517e45ef0.tar.gz
nextcloud-server-d41082f4d625ae5aa053e6f038fa498517e45ef0.zip
first step to drop \OCP\Config:: in favour of IConfig
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/api.php9
-rw-r--r--apps/files_sharing/tests/helper.php2
-rw-r--r--apps/files_sharing/tests/share.php2
3 files changed, 7 insertions, 6 deletions
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index dd6de15010f..278e7130199 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -948,10 +948,11 @@ class Test_Files_Sharing_Api extends TestCase {
function testUpdateShareExpireDate() {
$fileInfo = $this->view->getFileInfo($this->folder);
+ $config = \OC::$server->getConfig();
// enforce expire date, by default 7 days after the file was shared
- \OCP\Config::setAppValue('core', 'shareapi_default_expire_date', 'yes');
- \OCP\Config::setAppValue('core', 'shareapi_enforce_expire_date', 'yes');
+ $config->setAppValue('core', 'shareapi_default_expire_date', 'yes');
+ $config->setAppValue('core', 'shareapi_enforce_expire_date', 'yes');
$dateWithinRange = new \DateTime();
$dateWithinRange->add(new \DateInterval('P5D'));
@@ -1008,8 +1009,8 @@ class Test_Files_Sharing_Api extends TestCase {
$this->assertEquals($dateWithinRange->format('Y-m-d') . ' 00:00:00', $updatedLinkShare['expiration']);
// cleanup
- \OCP\Config::setAppValue('core', 'shareapi_default_expire_date', 'no');
- \OCP\Config::setAppValue('core', 'shareapi_enforce_expire_date', 'no');
+ $config->setAppValue('core', 'shareapi_default_expire_date', 'no');
+ $config->setAppValue('core', 'shareapi_enforce_expire_date', 'no');
\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_LINK, null);
}
diff --git a/apps/files_sharing/tests/helper.php b/apps/files_sharing/tests/helper.php
index 1a27739ec34..a9245ddafe5 100644
--- a/apps/files_sharing/tests/helper.php
+++ b/apps/files_sharing/tests/helper.php
@@ -35,7 +35,7 @@ class Test_Files_Sharing_Helper extends TestCase {
$this->assertSame('/Shared', \OCA\Files_Sharing\Helper::getShareFolder());
// cleanup
- \OCP\Config::deleteSystemValue('share_folder');
+ \OC::$server->getConfig()->deleteSystemValue('share_folder');
}
diff --git a/apps/files_sharing/tests/share.php b/apps/files_sharing/tests/share.php
index f76f92734d0..83ef17f49d1 100644
--- a/apps/files_sharing/tests/share.php
+++ b/apps/files_sharing/tests/share.php
@@ -243,7 +243,7 @@ class Test_Files_Sharing extends OCA\Files_sharing\Tests\TestCase {
$this->assertTrue(\OC\Files\Filesystem::file_exists('/Shared/subfolder/' . $this->folder));
//cleanup
- \OCP\Config::deleteSystemValue('share_folder');
+ \OC::$server->getConfig()->deleteSystemValue('share_folder');
}
/**