From d5805df6c2d89c6c4e5db7aa346cc9544689add4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?= <jus@bitgrid.net>
Date: Thu, 13 Jun 2019 20:23:29 +0200
Subject: [PATCH] Fix subscription tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Julius Härtl <jus@bitgrid.net>
---
 tests/Core/Controller/OCSControllerTest.php     |  2 ++
 tests/lib/Support/Subscription/RegistryTest.php | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/tests/Core/Controller/OCSControllerTest.php b/tests/Core/Controller/OCSControllerTest.php
index aa2c780f82e..a22c3bdc5e0 100644
--- a/tests/Core/Controller/OCSControllerTest.php
+++ b/tests/Core/Controller/OCSControllerTest.php
@@ -97,6 +97,7 @@ class OCSControllerTest extends TestCase {
 			'micro' => $micro,
 			'string' => \OC_Util::getVersionString(),
 			'edition' => '',
+			'extendedSupport' => false
 		);
 
 		$capabilities = [
@@ -128,6 +129,7 @@ class OCSControllerTest extends TestCase {
 			'micro' => $micro,
 			'string' => \OC_Util::getVersionString(),
 			'edition' => '',
+			'extendedSupport' => false
 		);
 
 		$capabilities = [
diff --git a/tests/lib/Support/Subscription/RegistryTest.php b/tests/lib/Support/Subscription/RegistryTest.php
index 21dad6e50e1..c9557def0fd 100644
--- a/tests/lib/Support/Subscription/RegistryTest.php
+++ b/tests/lib/Support/Subscription/RegistryTest.php
@@ -74,6 +74,18 @@ class RegistryTest extends TestCase {
 		$this->assertSame(true, $this->registry->delegateHasValidSubscription());
 	}
 
+	public function testDelegateHasExtendedSupport() {
+		/* @var ISubscription|\PHPUnit_Framework_MockObject_MockObject $subscription */
+		$subscription = $this->createMock(ISubscription::class);
+		$subscription->expects($this->once())
+			->method('hasExtendedSupport')
+			->willReturn(true);
+		$this->registry->register($subscription);
+
+		$this->assertSame(true, $this->registry->delegateHasExtendedSupport());
+	}
+
+
 	public function testDelegateGetSupportedApps() {
 		/* @var ISupportedApps|\PHPUnit_Framework_MockObject_MockObject $subscription */
 		$subscription = $this->createMock(ISupportedApps::class);
-- 
GitLab