mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 17:52:02 -04:00
Fix risky test in twofactor_backupcodes
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
bdf98cfbde
commit
6777f6d540
1 changed files with 5 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue