diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-03-18 00:01:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-18 00:01:17 +0100 |
commit | 3adee0f18bda27d380459236fe26f2f4ea5feaa8 (patch) | |
tree | 2da10d79e72dee1351c3973dd29210a843e3352f /tests | |
parent | 3c66ad64e626cb602685a640c235d472f0777a53 (diff) | |
parent | 75b81c3e01f3a5dc97e78c8e82fd5f94a071daba (diff) | |
download | nextcloud-server-3adee0f18bda27d380459236fe26f2f4ea5feaa8.tar.gz nextcloud-server-3adee0f18bda27d380459236fe26f2f4ea5feaa8.zip |
Merge pull request #3898 from nextcloud/issue-3627-always-suggest-cli-url
Always suggest the overwrite.cli.url
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Settings/Admin/ServerTest.php | 11 | ||||
-rw-r--r-- | tests/lib/Settings/ManagerTest.php | 5 |
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 ); |