aboutsummaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php')
-rw-r--r--apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php
index b556828b924..cfc35e7cb1c 100644
--- a/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php
+++ b/apps/twofactor_backupcodes/tests/Service/BackupCodeStorageTest.php
@@ -13,21 +13,16 @@ use OCP\IUser;
use OCP\Notification\IManager;
use OCP\Notification\INotification;
use OCP\Server;
+use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
/**
* @group DB
*/
class BackupCodeStorageTest extends TestCase {
-
- /** @var BackupCodeStorage */
- private $storage;
-
- /** @var string */
- private $testUID = 'test123456789';
-
- /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
- private $notificationManager;
+ private IManager&MockObject $notificationManager;
+ private string $testUID = 'test123456789';
+ private BackupCodeStorage $storage;
protected function setUp(): void {
parent::setUp();
@@ -49,10 +44,10 @@ class BackupCodeStorageTest extends TestCase {
$this->notificationManager->expects($this->once())
->method('markProcessed')
->with($this->callback(function (INotification $notification) {
- return $notification->getUser() === $this->testUID &&
- $notification->getObjectType() === 'create' &&
- $notification->getObjectId() === 'codes' &&
- $notification->getApp() === 'twofactor_backupcodes';
+ return $notification->getUser() === $this->testUID
+ && $notification->getObjectType() === 'create'
+ && $notification->getObjectId() === 'codes'
+ && $notification->getApp() === 'twofactor_backupcodes';
}));
// Create codes