From 4090fff0f33fd0159d3665cf989bcbeee0c50b74 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 22 Feb 2020 11:07:30 +0100 Subject: [PATCH] fixed test --- lam/tests/lib/webauthnTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lam/tests/lib/webauthnTest.php b/lam/tests/lib/webauthnTest.php index a2846cb3..dbe691ec 100644 --- a/lam/tests/lib/webauthnTest.php +++ b/lam/tests/lib/webauthnTest.php @@ -49,14 +49,15 @@ class WebauthnManagerTest extends TestCase { protected function setup(): void { $this->database = $this ->getMockBuilder(PublicKeyCredentialSourceRepositorySQLite::class) - ->setMethods(array('findOneByCredentialId', 'findAllForUserEntity', 'saveCredentialSource')) + ->onlyMethods(array('findOneByCredentialId', 'findAllForUserEntity', 'saveCredentialSource')) ->getMock(); $this->database->method('findOneByCredentialId')->willReturn(null); $this->database->method('findAllForUserEntity')->willReturn(array()); + $this->database->method('saveCredentialSource')->willReturn(null); $this->manager = $this ->getMockBuilder(WebauthnManager::class) - ->setMethods(array('getDatabase')) + ->onlyMethods(array('getDatabase')) ->getMock(); $this->manager->method('getDatabase')->willReturn($this->database);