]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix failing unit test
authorMorris Jobke <hey@morrisjobke.de>
Tue, 17 Mar 2015 16:26:03 +0000 (17:26 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 17 Mar 2015 16:26:03 +0000 (17:26 +0100)
tests/lib/share/share.php

index 1ef62dc2b078533cbc6a74251fe764e773b28d85..4fa498f3156a8e5776aa708e7024cea8e2ac5ddf 100644 (file)
@@ -857,8 +857,10 @@ class Test_Share extends \Test\TestCase {
        public function testShareItemWithLinkAndDefaultExpireDate() {
                OC_User::setUserId($this->user1);
 
-               \OC_Appconfig::setValue('core', 'shareapi_default_expire_date', 'yes');
-               \OC_Appconfig::setValue('core', 'shareapi_expire_after_n_days', '2');
+               $config = \OC::$server->getConfig();
+
+               $config->setAppValue('core', 'shareapi_default_expire_date', 'yes');
+               $config->setAppValue('core', 'shareapi_expire_after_n_days', '2');
 
                $token = OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ);
                $this->assertInternalType(
@@ -875,8 +877,8 @@ class Test_Share extends \Test\TestCase {
                        'Failed asserting that the returned row has an default expiration date.'
                );
 
-               \OC_Appconfig::deleteKey('core', 'shareapi_default_expire_date');
-               \OC_Appconfig::deleteKey('core', 'shareapi_expire_after_n_days');
+               $config->deleteAppValue('core', 'shareapi_default_expire_date');
+               $config->deleteAppValue('core', 'shareapi_expire_after_n_days');
 
        }