fixed test
This commit is contained in:
parent
0610004c7d
commit
4090fff0f3
|
@ -49,14 +49,15 @@ class WebauthnManagerTest extends TestCase {
|
||||||
protected function setup(): void {
|
protected function setup(): void {
|
||||||
$this->database = $this
|
$this->database = $this
|
||||||
->getMockBuilder(PublicKeyCredentialSourceRepositorySQLite::class)
|
->getMockBuilder(PublicKeyCredentialSourceRepositorySQLite::class)
|
||||||
->setMethods(array('findOneByCredentialId', 'findAllForUserEntity', 'saveCredentialSource'))
|
->onlyMethods(array('findOneByCredentialId', 'findAllForUserEntity', 'saveCredentialSource'))
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->database->method('findOneByCredentialId')->willReturn(null);
|
$this->database->method('findOneByCredentialId')->willReturn(null);
|
||||||
$this->database->method('findAllForUserEntity')->willReturn(array());
|
$this->database->method('findAllForUserEntity')->willReturn(array());
|
||||||
|
$this->database->method('saveCredentialSource')->willReturn(null);
|
||||||
|
|
||||||
$this->manager = $this
|
$this->manager = $this
|
||||||
->getMockBuilder(WebauthnManager::class)
|
->getMockBuilder(WebauthnManager::class)
|
||||||
->setMethods(array('getDatabase'))
|
->onlyMethods(array('getDatabase'))
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->manager->method('getDatabase')->willReturn($this->database);
|
$this->manager->method('getDatabase')->willReturn($this->database);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue