Fix subscription tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>
pull/15922/head
Julius Härtl 7 years ago
parent df072471a7
commit d5805df6c2
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
  1. 2
      tests/Core/Controller/OCSControllerTest.php
  2. 12
      tests/lib/Support/Subscription/RegistryTest.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 = [

@ -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);

Loading…
Cancel
Save