Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-24 14:20:24 +0300
committerGitHub <noreply@github.com>2020-07-24 14:20:24 +0300
commit56963ce12329935c77e1416931ca95ca33a3ed16 (patch)
treea979b822a12960a217a877e8533138d3c6752b2e /apps
parenteee93ac082327b905d2e0090bff5ae5d87fd613d (diff)
parent6777f6d540971f70bed754937684bb2fdca7481b (diff)
Merge pull request #21980 from nextcloud/backport/21973/stable17
[stable17] Fix risky test in twofactor_backupcodes
Diffstat (limited to 'apps')
-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 76cdac3c21a..146cd3b7e37 100644
--- a/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
+++ b/apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php
@@ -114,8 +114,13 @@ 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));
}
}