Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-17 23:10:40 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-17 23:41:56 +0300
commit09f8a755ec6897eb72aa1da4eff623807201623d (patch)
treec8072f914b1de3ebcdf373a2547303adcd8ad479 /tests
parentee2617d88c17165dd3a4862f2a5b98a434435430 (diff)
Remove IAppConfig::getValue
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/AppManagerTest.php7
-rw-r--r--tests/lib/AppTest.php2
-rw-r--r--tests/lib/Files/ViewTest.php14
-rw-r--r--tests/lib/Share/ShareTest.php2
4 files changed, 13 insertions, 12 deletions
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php
index c361db7b76b..35650054105 100644
--- a/tests/lib/App/AppManagerTest.php
+++ b/tests/lib/App/AppManagerTest.php
@@ -10,6 +10,7 @@
namespace Test\App;
use OC\App\AppManager;
+use OC\AppConfig;
use OC\Group\Group;
use OC\User\User;
use OCP\App\AppPathNotFoundException;
@@ -31,11 +32,11 @@ use Test\TestCase;
*/
class AppManagerTest extends TestCase {
/**
- * @return IAppConfig|\PHPUnit_Framework_MockObject_MockObject
+ * @return AppConfig|\PHPUnit_Framework_MockObject_MockObject
*/
protected function getAppConfig() {
$appConfig = array();
- $config = $this->createMock(IAppConfig::class);
+ $config = $this->createMock(AppConfig::class);
$config->expects($this->any())
->method('getValue')
@@ -75,7 +76,7 @@ class AppManagerTest extends TestCase {
/** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
protected $groupManager;
- /** @var IAppConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var AppConfig|\PHPUnit_Framework_MockObject_MockObject */
protected $appConfig;
/** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
diff --git a/tests/lib/AppTest.php b/tests/lib/AppTest.php
index 620e9344c43..d10ad387599 100644
--- a/tests/lib/AppTest.php
+++ b/tests/lib/AppTest.php
@@ -542,7 +542,7 @@ class AppTest extends \Test\TestCase {
*
* @param IAppConfig $appConfig app config mock
*/
- private function registerAppConfig(IAppConfig $appConfig) {
+ private function registerAppConfig(AppConfig $appConfig) {
$this->overwriteService('AppConfig', $appConfig);
$this->overwriteService('AppManager', new \OC\App\AppManager(
\OC::$server->getUserSession(),
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index 33d5cc0a8a6..627eb71d6bf 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -284,11 +284,11 @@ class ViewTest extends \Test\TestCase {
// Reset sharing disabled for users cache
self::invokePrivate(\OC::$server->getShareManager(), 'sharingDisabledForUsersCache', [new CappedMemoryCache()]);
- $appConfig = \OC::$server->getAppConfig();
- $oldExcludeGroupsFlag = $appConfig->getValue('core', 'shareapi_exclude_groups', 'no');
- $oldExcludeGroupsList = $appConfig->getValue('core', 'shareapi_exclude_groups_list', '');
- $appConfig->setValue('core', 'shareapi_exclude_groups', $excludeGroups);
- $appConfig->setValue('core', 'shareapi_exclude_groups_list', $excludeGroupsList);
+ $config = \OC::$server->getConfig();
+ $oldExcludeGroupsFlag = $config->getAppValue('core', 'shareapi_exclude_groups', 'no');
+ $oldExcludeGroupsList = $config->getAppValue('core', 'shareapi_exclude_groups_list', '');
+ $config->setAppValue('core', 'shareapi_exclude_groups', $excludeGroups);
+ $config->setAppValue('core', 'shareapi_exclude_groups_list', $excludeGroupsList);
$storage1 = $this->getTestStorage();
$storage2 = $this->getTestStorage();
@@ -303,8 +303,8 @@ class ViewTest extends \Test\TestCase {
$folderContent = $view->getDirectoryContent('mount');
$this->assertEquals($expectedShareable, $folderContent[0]->isShareable());
- $appConfig->setValue('core', 'shareapi_exclude_groups', $oldExcludeGroupsFlag);
- $appConfig->setValue('core', 'shareapi_exclude_groups_list', $oldExcludeGroupsList);
+ $config->setAppValue('core', 'shareapi_exclude_groups', $oldExcludeGroupsFlag);
+ $config->setAppValue('core', 'shareapi_exclude_groups_list', $oldExcludeGroupsList);
// Reset sharing disabled for users cache
self::invokePrivate(\OC::$server->getShareManager(), 'sharingDisabledForUsersCache', [new CappedMemoryCache()]);
diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php
index e93b0f553cd..07034bef1a4 100644
--- a/tests/lib/Share/ShareTest.php
+++ b/tests/lib/Share/ShareTest.php
@@ -103,7 +103,7 @@ class ShareTest extends \Test\TestCase {
\OC\Share\Share::registerBackend('test', 'Test\Share\Backend');
\OC_Hook::clear('OCP\\Share');
\OC::registerShareHooks();
- $this->resharing = \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_resharing', 'yes');
+ $this->resharing = \OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_resharing', 'yes');
\OC::$server->getAppConfig()->setValue('core', 'shareapi_allow_resharing', 'yes');
// 20 Minutes in the past, 20 minutes in the future.