diff --git a/tests/lib/Security/IdentityProof/ManagerTest.php b/tests/lib/Security/IdentityProof/ManagerTest.php index 8733d5de8befd..847fb3e77f39e 100644 --- a/tests/lib/Security/IdentityProof/ManagerTest.php +++ b/tests/lib/Security/IdentityProof/ManagerTest.php @@ -128,10 +128,14 @@ public function testGetKeyWithExistingKey() { $publicFile ); $this->appData - ->expects($this->once()) + ->expects($this->exactly(2)) ->method('getFolder') ->with('user-MyUid') ->willReturn($folder); + $this->manager + ->expects($this->once()) + ->method('generateKeyPair') + ->willReturn(['MyPublicKey', 'MyPrivateKey']); $expected = new Key('MyPublicKey', 'MyPrivateKey'); $this->assertEquals($expected, $this->manager->getKey($user));