summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
index ae5a10232e9..489ca74f3c6 100644
--- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
+++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
@@ -117,7 +117,12 @@ class BackupCodeMapperTest extends TestCase {
$code->setUserId($this->testUID);
$code->setCode('2|$argon2i$v=19$m=1024,t=2,p=2$MjJWUjRFWndtMm5BWGxOag$BusVxLeFyiLLWtaVvX/JRFBiPdZcjRrzpQ/rAhn6vqY');
$code->setUsed(1);
+ $user = $this->getMockBuilder(IUser::class)->getMock();
+ $user->expects($this->any())
+ ->method('getUID')
+ ->willReturn($this->testUID);
$this->mapper->insert($code);
+ $this->assertCount(1, $this->mapper->getBackupCodes($user));
}
}