diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-12-02 15:56:59 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-02 15:56:59 +0100 |
commit | 37ecde065b8826098543dc4544732239c7a4cabf (patch) | |
tree | dce033e2d44a82ad0ccb91339e6df8cccb870f19 /apps/files_trashbin/tests | |
parent | c35a450cb1c0df0f77dea4c69182a381543b679a (diff) | |
download | nextcloud-server-37ecde065b8826098543dc4544732239c7a4cabf.tar.gz nextcloud-server-37ecde065b8826098543dc4544732239c7a4cabf.zip |
Replace old config code with usage of proper APIs
Diffstat (limited to 'apps/files_trashbin/tests')
-rw-r--r-- | apps/files_trashbin/tests/trashbin.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php index 1b5e955d2b2..c53ed8d8a9b 100644 --- a/apps/files_trashbin/tests/trashbin.php +++ b/apps/files_trashbin/tests/trashbin.php @@ -71,9 +71,10 @@ class Test_Trashbin extends \Test\TestCase { //disable encryption \OC_App::disable('encryption'); + $config = \OC::$server->getConfig(); //configure trashbin - self::$rememberRetentionObligation = \OC_Config::getValue('trashbin_retention_obligation', Files_Trashbin\Expiration::DEFAULT_RETENTION_OBLIGATION); - \OC_Config::setValue('trashbin_retention_obligation', 'auto, 2'); + self::$rememberRetentionObligation = $config->getSystemValue('trashbin_retention_obligation', Files_Trashbin\Expiration::DEFAULT_RETENTION_OBLIGATION); + $config->setSystemValue('trashbin_retention_obligation', 'auto, 2'); // register hooks Files_Trashbin\Trashbin::registerHooks(); @@ -89,7 +90,7 @@ class Test_Trashbin extends \Test\TestCase { // cleanup test user \OC_User::deleteUser(self::TEST_TRASHBIN_USER1); - \OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation); + \OC::$server->getConfig()->setSystemValue('trashbin_retention_obligation', self::$rememberRetentionObligation); \OC_Hook::clear(); |