aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2021-10-14 11:57:28 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2021-10-14 14:48:45 +0200
commit1f76423500f2562892b87effc112947e162f8a28 (patch)
treed3a2f4201e98dd62f3ca135c4b6c4faee1fdee2b /tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
parented533bd128807ae4e41efb590d59afe05c26668c (diff)
downloadnextcloud-server-1f76423500f2562892b87effc112947e162f8a28.tar.gz
nextcloud-server-1f76423500f2562892b87effc112947e162f8a28.zip
Send the subscription key to the appstore requests
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'tests/lib/App/AppStore/Fetcher/AppFetcherTest.php')
-rw-r--r--tests/lib/App/AppStore/Fetcher/AppFetcherTest.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
index 44869d353a4..f8f00ef73b8 100644
--- a/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
+++ b/tests/lib/App/AppStore/Fetcher/AppFetcherTest.php
@@ -51,7 +51,7 @@ class AppFetcherTest extends TestCase {
protected $compareVersion;
/** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IRegistry */
+ /** @var IRegistry|\PHPUnit\Framework\MockObject\MockObject */
protected $registry;
/** @var AppFetcher */
protected $fetcher;
@@ -2067,7 +2067,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
$this->assertEquals(self::$expectedResponse['data'], $this->fetcher->get());
}
- public function testGetWhitelist() {
+ public function testGetAppsAllowlist() {
$this->config->method('getSystemValue')
->willReturnCallback(function ($key, $default) {
if ($key === 'appstoreenabled') {
@@ -2082,7 +2082,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
return $default;
}
});
-
+
$file = $this->createMock(ISimpleFile::class);
$folder = $this->createMock(ISimpleFolder::class);
$folder
@@ -2107,6 +2107,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
->willReturn($client);
$response = $this->createMock(IResponse::class);
$client
+ ->expects($this->once())
->method('get')
->with('https://custom.appsstore.endpoint/api/v1/apps.json')
->willReturn($response);
@@ -2123,7 +2124,7 @@ EJL3BaQAQaASSsvFrcozYxrQG4VzEg==
->willReturn(1234);
$this->registry
- ->expects($this->once())
+ ->expects($this->exactly(2))
->method('delegateHasValidSubscription')
->willReturn(true);