Merge pull request #21978 from nextcloud/backport/21973/stable19
[stable19] Fix risky test in twofactor_backupcodes
This commit is contained in:
commit
874a1ef500
|
@ -117,7 +117,12 @@ class BackupCodeMapperTest extends TestCase {
|
||||||
$code->setUserId($this->testUID);
|
$code->setUserId($this->testUID);
|
||||||
$code->setCode('2|$argon2i$v=19$m=1024,t=2,p=2$MjJWUjRFWndtMm5BWGxOag$BusVxLeFyiLLWtaVvX/JRFBiPdZcjRrzpQ/rAhn6vqY');
|
$code->setCode('2|$argon2i$v=19$m=1024,t=2,p=2$MjJWUjRFWndtMm5BWGxOag$BusVxLeFyiLLWtaVvX/JRFBiPdZcjRrzpQ/rAhn6vqY');
|
||||||
$code->setUsed(1);
|
$code->setUsed(1);
|
||||||
|
$user = $this->getMockBuilder(IUser::class)->getMock();
|
||||||
|
$user->expects($this->any())
|
||||||
|
->method('getUID')
|
||||||
|
->willReturn($this->testUID);
|
||||||
|
|
||||||
$this->mapper->insert($code);
|
$this->mapper->insert($code);
|
||||||
|
$this->assertCount(1, $this->mapper->getBackupCodes($user));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue