improve code

This commit is contained in:
2022-12-13 22:24:33 +01:00
parent 4183ebcf99
commit 68b9f53c14
81 changed files with 271 additions and 218 deletions

View File

@ -92,7 +92,7 @@ class UserComponentWebauthnTest extends UnitTestCase
->onlyMethods(['getRequestParameter'])
->getMock();
$requestMock->method('getRequestParameter')->willReturnMap([
['lgn_usr', 'myUserName']
['lgn_usr', 'myUserName'],
]);
/** @var User|MockObject $userMock */
@ -112,7 +112,7 @@ class UserComponentWebauthnTest extends UnitTestCase
/** @var d3_webauthn_UserComponent|MockObject $sut */
$sut = $this->getMockBuilder(UserComponent::class)
->onlyMethods(['d3CanUseWebauthn', 'd3CallMockableFunction', 'd3HasWebauthnButNotLoggedin',
'd3GetMockableOxNewObject', 'd3GetMockableRegistryObject', 'getParent'
'd3GetMockableOxNewObject', 'd3GetMockableRegistryObject', 'getParent',
])
->getMock();
$sut->method('d3CanUseWebauthn')->willReturn($canUseWebauthn);
@ -433,7 +433,7 @@ class UserComponentWebauthnTest extends UnitTestCase
return [
'passed' => [null, $this->once(), $this->never()],
'webauthnException' => [WebauthnGetException::class, $this->never(), $this->once()],
'webauthnLoginError' => [WebauthnLoginErrorException::class, $this->never(), $this->never()]
'webauthnLoginError' => [WebauthnLoginErrorException::class, $this->never(), $this->never()],
];
}
}
}