aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Support/Subscription
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Support/Subscription')
-rw-r--r--tests/lib/Support/Subscription/DummySubscription.php18
-rw-r--r--tests/lib/Support/Subscription/RegistryTest.php3
2 files changed, 9 insertions, 12 deletions
diff --git a/tests/lib/Support/Subscription/DummySubscription.php b/tests/lib/Support/Subscription/DummySubscription.php
index ca1644c91f5..4513bf278f6 100644
--- a/tests/lib/Support/Subscription/DummySubscription.php
+++ b/tests/lib/Support/Subscription/DummySubscription.php
@@ -9,24 +9,20 @@ declare(strict_types=1);
namespace Test\Support\Subscription;
-class DummySubscription implements \OCP\Support\Subscription\ISubscription {
- /** @var bool */
- private $hasValidSubscription;
- /** @var bool */
- private $hasExtendedSupport;
- /** @var bool */
- private $isHardUserLimitReached;
+use OCP\Support\Subscription\ISubscription;
+class DummySubscription implements ISubscription {
/**
* DummySubscription constructor.
*
* @param bool $hasValidSubscription
* @param bool $hasExtendedSupport
*/
- public function __construct(bool $hasValidSubscription, bool $hasExtendedSupport, bool $isHardUserLimitReached) {
- $this->hasValidSubscription = $hasValidSubscription;
- $this->hasExtendedSupport = $hasExtendedSupport;
- $this->isHardUserLimitReached = $isHardUserLimitReached;
+ public function __construct(
+ private bool $hasValidSubscription,
+ private bool $hasExtendedSupport,
+ private bool $isHardUserLimitReached,
+ ) {
}
/**
diff --git a/tests/lib/Support/Subscription/RegistryTest.php b/tests/lib/Support/Subscription/RegistryTest.php
index 08a216294d6..3f2b9f5032f 100644
--- a/tests/lib/Support/Subscription/RegistryTest.php
+++ b/tests/lib/Support/Subscription/RegistryTest.php
@@ -14,6 +14,7 @@ use OCP\IGroupManager;
use OCP\IServerContainer;
use OCP\IUserManager;
use OCP\Notification\IManager;
+use OCP\Support\Subscription\Exception\AlreadyRegisteredException;
use OCP\Support\Subscription\ISubscription;
use OCP\Support\Subscription\ISupportedApps;
use PHPUnit\Framework\MockObject\MockObject;
@@ -58,7 +59,7 @@ class RegistryTest extends TestCase {
public function testDoubleRegistration(): void {
- $this->expectException(\OCP\Support\Subscription\Exception\AlreadyRegisteredException::class);
+ $this->expectException(AlreadyRegisteredException::class);
/* @var ISubscription $subscription1 */
$subscription1 = $this->createMock(ISubscription::class);