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:
authorGeorg Ehrke <developer@georgehrke.com>2019-12-17 14:20:51 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-12-22 17:06:31 +0300
commitf0bef8881dd9861c615f56da058a165c2cc5ce86 (patch)
tree86ae91c4bfcdb6a69f3f0daf161491228f25349c /tests
parent12136a0cff9a6e552391bff9317a546f970c98b4 (diff)
Restore old behavior allowing to set custom appstore
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php4
-rw-r--r--tests/lib/App/AppStore/Fetcher/FetcherBase.php15
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index 9a118234049..ac9ac06d19d 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -92,6 +92,8 @@ EOD;
return true;
} else if ($key === 'version') {
return '11.0.0.2';
+ } else if ($key === 'appstoreurl' && $default === 'https://apps.nextcloud.com/api/v1') {
+ return 'https://custom.appsstore.endpoint/api/v1';
} else {
return $default;
}
@@ -122,7 +124,7 @@ EOD;
$response = $this->createMock(IResponse::class);
$client
->method('get')
- ->with('https://apps.nextcloud.com/api/v1/apps.json')
+ ->with('https://custom.appsstore.endpoint/api/v1/apps.json')
->willReturn($response);
$response
->expects($this->once())
diff --git a/tests/lib/App/AppStore/Fetcher/FetcherBase.php b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
index 84584e5432f..9dac4dd7499 100644
--- a/tests/lib/App/AppStore/Fetcher/FetcherBase.php
+++ b/tests/lib/App/AppStore/Fetcher/FetcherBase.php
@@ -137,6 +137,11 @@ abstract class FetcherBase extends TestCase {
$this->config
->expects($this->at(3))
->method('getSystemValue')
+ ->with('appstoreurl', 'https://apps.nextcloud.com/api/v1')
+ ->willReturn('https://apps.nextcloud.com/api/v1');
+ $this->config
+ ->expects($this->at(4))
+ ->method('getSystemValue')
->with(
$this->equalTo('version'),
$this->anything()
@@ -298,6 +303,11 @@ abstract class FetcherBase extends TestCase {
$this->config
->expects($this->at(3))
->method('getSystemValue')
+ ->with('appstoreurl', 'https://apps.nextcloud.com/api/v1')
+ ->willReturn('https://apps.nextcloud.com/api/v1');
+ $this->config
+ ->expects($this->at(4))
+ ->method('getSystemValue')
->with(
$this->equalTo('version'),
$this->anything()
@@ -382,6 +392,11 @@ abstract class FetcherBase extends TestCase {
$this->config
->expects($this->at(3))
->method('getSystemValue')
+ ->with('appstoreurl', 'https://apps.nextcloud.com/api/v1')
+ ->willReturn('https://apps.nextcloud.com/api/v1');
+ $this->config
+ ->expects($this->at(4))
+ ->method('getSystemValue')
->with(
$this->equalTo('version'),
$this->anything()