summaryrefslogtreecommitdiffstats
path: root/tests/lib/Settings
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-17 13:34:23 +0100
committerJoas Schilling <coding@schilljs.com>2017-03-17 13:40:58 +0100
commit75b81c3e01f3a5dc97e78c8e82fd5f94a071daba (patch)
treeca1e4806fe017748f8d4dcf209adae714c5fa8e4 /tests/lib/Settings
parenta5c8016c8b7c50f73b7a16b6bd2284ed06f35d8e (diff)
downloadnextcloud-server-75b81c3e01f3a5dc97e78c8e82fd5f94a071daba.tar.gz
nextcloud-server-75b81c3e01f3a5dc97e78c8e82fd5f94a071daba.zip
Always suggest the overwrite.cli.url
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Settings')
-rw-r--r--tests/lib/Settings/Admin/ServerTest.php11
-rw-r--r--tests/lib/Settings/ManagerTest.php5
2 files changed, 13 insertions, 3 deletions
diff --git a/tests/lib/Settings/Admin/ServerTest.php b/tests/lib/Settings/Admin/ServerTest.php
index 43892c408b0..f876ae85136 100644
--- a/tests/lib/Settings/Admin/ServerTest.php
+++ b/tests/lib/Settings/Admin/ServerTest.php
@@ -29,6 +29,7 @@ use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IL10N;
+use OCP\IRequest;
use OCP\Lock\ILockingProvider;
use Test\TestCase;
@@ -37,6 +38,8 @@ class ServerTest extends TestCase {
private $admin;
/** @var IDBConnection */
private $dbConnection;
+ /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ private $request;
/** @var IConfig */
private $config;
/** @var ILockingProvider */
@@ -47,12 +50,14 @@ class ServerTest extends TestCase {
public function setUp() {
parent::setUp();
$this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->request = $this->createMock(IRequest::class);
$this->dbConnection = $this->getMockBuilder('\OCP\IDBConnection')->getMock();
$this->lockingProvider = $this->getMockBuilder('\OCP\Lock\ILockingProvider')->getMock();
$this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->admin = new Server(
$this->dbConnection,
+ $this->request,
$this->config,
$this->lockingProvider,
$this->l10n
@@ -66,9 +71,9 @@ class ServerTest extends TestCase {
->willReturn(new SqlitePlatform());
$this->config
->expects($this->at(0))
- ->method('getAppValue')
- ->with('core', 'backgroundjobs_mode', 'ajax')
- ->willReturn('ajax');
+ ->method('getSystemValue')
+ ->with('overwrite.cli.url', '')
+ ->willReturn(true);
$this->config
->expects($this->at(2))
->method('getAppValue')
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php
index 70401abb652..2122c8b3750 100644
--- a/tests/lib/Settings/ManagerTest.php
+++ b/tests/lib/Settings/ManagerTest.php
@@ -32,6 +32,7 @@ use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IL10N;
use OCP\ILogger;
+use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Lock\ILockingProvider;
@@ -54,6 +55,8 @@ class ManagerTest extends TestCase {
private $userManager;
/** @var ILockingProvider|\PHPUnit_Framework_MockObject_MockObject */
private $lockingProvider;
+ /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */
+ private $request;
/** @var Mapper|\PHPUnit_Framework_MockObject_MockObject */
private $mapper;
/** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
@@ -69,6 +72,7 @@ class ManagerTest extends TestCase {
$this->encryptionManager = $this->createMock(IManager::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->lockingProvider = $this->createMock(ILockingProvider::class);
+ $this->request = $this->createMock(IRequest::class);
$this->mapper = $this->createMock(Mapper::class);
$this->url = $this->createMock(IURLGenerator::class);
@@ -80,6 +84,7 @@ class ManagerTest extends TestCase {
$this->encryptionManager,
$this->userManager,
$this->lockingProvider,
+ $this->request,
$this->mapper,
$this->url
);