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>2019-03-06 21:59:15 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-03-20 17:16:11 +0300
commit769cb629aebd368fbddd6ea04067fdcfaa262e3e (patch)
tree432bfb3aca1d60128e79da57c2053bf7f19291a2 /tests
parent1c8779dc6e34a89ea9181b3cb252101e457c1543 (diff)
allow enforcing apps to ignore the max version
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index 1465e09d08b..214f652742b 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -75,11 +75,6 @@ EOD;
$this->compareVersion = new CompareVersion();
$this->logger = $this->createMock(ILogger::class);
- $this->config
- ->expects($this->at(0))
- ->method('getSystemValue')
- ->with('version')
- ->willReturn('11.0.0.2');
$this->fetcher = new AppFetcher(
$factory,
$this->clientService,
@@ -126,9 +121,8 @@ EOD;
->willReturn($client);
$response = $this->createMock(IResponse::class);
$client
- ->expects($this->once())
->method('get')
- ->with('https://apps.nextcloud.com/api/v1/platform/11.0.0/apps.json')
+ ->with('https://apps.nextcloud.com/api/v1/apps.json')
->willReturn($response);
$response
->expects($this->once())
@@ -1940,10 +1934,8 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
$file
->expects($this->at(0))
- ->method('putContent')
- ->with(json_encode($dataToPut));
+ ->method('putContent');
$file
- ->expects($this->at(1))
->method('getContent')
->willReturn(json_encode($expected));
@@ -1956,6 +1948,8 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
->will($this->returnCallback(function($var, $default) {
if ($var === 'appstoreenabled') {
return false;
+ } else if ($var === 'version') {
+ return '11.0.0.2';
}
return $default;
}));
@@ -1973,6 +1967,8 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
->will($this->returnCallback(function($var, $default) {
if ($var === 'has_internet_connection') {
return false;
+ } else if ($var === 'version') {
+ return '11.0.0.2';
}
return $default;
}));