diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-12 14:15:08 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-12 20:33:46 +0100 |
commit | fffc19f5c3e2e1789564542f3562a7b56b587c8c (patch) | |
tree | a3d4685a5ff95f5afdcfa03e4be52ef57aa64f31 /apps/sharebymail/tests | |
parent | 7ecb65f725d7243d3f1433bb8d2cd1f981c90c07 (diff) | |
download | nextcloud-server-fffc19f5c3e2e1789564542f3562a7b56b587c8c.tar.gz nextcloud-server-fffc19f5c3e2e1789564542f3562a7b56b587c8c.zip |
Fix types warnings from psalm
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/sharebymail/tests')
-rw-r--r-- | apps/sharebymail/tests/ShareByMailProviderTest.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 45cab303669..af2d5bad57c 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -459,6 +459,7 @@ class ShareByMailProviderTest extends TestCase { public function testCreateMailShare() { $this->share->expects($this->any())->method('getToken')->willReturn('token'); $this->share->expects($this->once())->method('setToken')->with('token'); + $this->share->expects($this->any())->method('getSharedWith')->willReturn('valid@valid.com'); $node = $this->getMockBuilder('OCP\Files\Node')->getMock(); $node->expects($this->any())->method('getName')->willReturn('fileName'); $this->share->expects($this->any())->method('getNode')->willReturn($node); @@ -483,6 +484,7 @@ class ShareByMailProviderTest extends TestCase { $this->share->expects($this->any())->method('getToken')->willReturn('token'); $this->share->expects($this->once())->method('setToken')->with('token'); + $this->share->expects($this->any())->method('getSharedWith')->willReturn('valid@valid.com'); $node = $this->getMockBuilder('OCP\Files\Node')->getMock(); $node->expects($this->any())->method('getName')->willReturn('fileName'); $this->share->expects($this->any())->method('getNode')->willReturn($node); @@ -987,6 +989,7 @@ class ShareByMailProviderTest extends TestCase { ->willReturn(new \OC\Share20\Share($rootFolder, $userManager)); $provider = $this->getInstance(['sendMailNotification', 'createShareActivity']); + $this->mailer->expects($this->any())->method('validateMailAddress')->willReturn(true); $u1 = $userManager->createUser('testFed', md5(time())); $u2 = $userManager->createUser('testFed2', md5(time())); @@ -1033,6 +1036,7 @@ class ShareByMailProviderTest extends TestCase { ->willReturn(new \OC\Share20\Share($rootFolder, $userManager)); $provider = $this->getInstance(['sendMailNotification', 'createShareActivity']); + $this->mailer->expects($this->any())->method('validateMailAddress')->willReturn(true); $u1 = $userManager->createUser('testFed', md5(time())); $u2 = $userManager->createUser('testFed2', md5(time())); |