diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-24 13:20:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 13:20:05 +0200 |
commit | 874a1ef50001239a4ada309b6122cdd8fe98355b (patch) | |
tree | b0953d21b73763a8668162a66da991ffd8829e5c | |
parent | a05efb5217dfe4f97a40130411d3d51576f80e36 (diff) | |
parent | 5e97f39dad61c307311ac4f51f39567a0a05580f (diff) | |
download | nextcloud-server-874a1ef50001239a4ada309b6122cdd8fe98355b.tar.gz nextcloud-server-874a1ef50001239a4ada309b6122cdd8fe98355b.zip |
Merge pull request #21978 from nextcloud/backport/21973/stable19
[stable19] Fix risky test in twofactor_backupcodes
-rw-r--r-- | apps/twofactor_backupcodes/tests/Db/BackupCodeMapperTest.php | 5 |
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)); } } |