Fix risky test in twofactor_backupcodes

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-07-23 14:32:58 +02:00 committed by backportbot[bot]
parent c7824c30ad
commit 2701e76cfe

View file

@ -117,8 +117,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));
}
}