summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-03 15:24:41 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-03 15:24:41 +0100
commit0fe5506e9172154544d798d2501ec16f34fae730 (patch)
treeb457f0c86e3165a3983a42ac1a48a979212a6861 /tests
parent2d1cc8aaebc567cc006d387921c7fbbed35280ce (diff)
parentcbe6eeffa17415aec46852e7ff5442618ffb116b (diff)
downloadnextcloud-server-0fe5506e9172154544d798d2501ec16f34fae730.tar.gz
nextcloud-server-0fe5506e9172154544d798d2501ec16f34fae730.zip
Merge pull request #20921 from owncloud/last-OC_Config-removals-in-tests
Reduce OC_Config usage in tests/
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/filesystem.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index 7829eb9d706..c5ebbdd1a2d 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -314,7 +314,6 @@ class Filesystem extends \Test\TestCase {
* @expectedException \OC\User\NoUserException
*/
public function testLocalMountWhenUserDoesNotExist() {
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
$userId = $this->getUniqueID('user_');
\OC\Files\Filesystem::initMountPoints($userId);
@@ -352,7 +351,7 @@ class Filesystem extends \Test\TestCase {
if (getenv('RUN_OBJECTSTORE_TESTS')) {
$this->markTestSkipped('legacy storage unrelated to objectstore environments');
}
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
+ $datadir = \OC::$server->getConfig()->getSystemValue("datadirectory", \OC::$SERVERROOT . "/data");
$userId = $this->getUniqueID('user_');
// insert storage into DB by constructing it
@@ -384,9 +383,10 @@ class Filesystem extends \Test\TestCase {
*/
public function testMountDefaultCacheDir() {
$userId = $this->getUniqueID('user_');
- $oldCachePath = \OC_Config::getValue('cache_path', '');
+ $config = \OC::$server->getConfig();
+ $oldCachePath = $config->getSystemValue('cache_path', '');
// no cache path configured
- \OC_Config::setValue('cache_path', '');
+ $config->setSystemValue('cache_path', '');
\OC_User::createUser($userId, $userId);
\OC\Files\Filesystem::initMountPoints($userId);
@@ -400,7 +400,7 @@ class Filesystem extends \Test\TestCase {
$this->assertEquals('cache', $internalPath);
\OC_User::deleteUser($userId);
- \OC_Config::setValue('cache_path', $oldCachePath);
+ $config->setSystemValue('cache_path', $oldCachePath);
}
/**
@@ -410,10 +410,11 @@ class Filesystem extends \Test\TestCase {
public function testMountExternalCacheDir() {
$userId = $this->getUniqueID('user_');
- $oldCachePath = \OC_Config::getValue('cache_path', '');
+ $config = \OC::$server->getConfig();
+ $oldCachePath = $config->getSystemValue('cache_path', '');
// set cache path to temp dir
$cachePath = \OC_Helper::tmpFolder() . '/extcache';
- \OC_Config::setValue('cache_path', $cachePath);
+ $config->setSystemValue('cache_path', $cachePath);
\OC_User::createUser($userId, $userId);
\OC\Files\Filesystem::initMountPoints($userId);
@@ -427,7 +428,7 @@ class Filesystem extends \Test\TestCase {
$this->assertEquals('', $internalPath);
\OC_User::deleteUser($userId);
- \OC_Config::setValue('cache_path', $oldCachePath);
+ $config->setSystemValue('cache_path', $oldCachePath);
}
public function testRegisterMountProviderAfterSetup() {