aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-10-22 13:43:39 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-10-26 20:52:41 +0200
commitb7046d390fb651e7f83b22a02ca35deefcaab6e9 (patch)
tree8f239966a84e848efa7ae94f0ca668ac3156d2db /tests/lib/Share
parent57e61250ac6c59fe93c65a95bfd2cb081cd3c34f (diff)
downloadnextcloud-server-b7046d390fb651e7f83b22a02ca35deefcaab6e9.tar.gz
nextcloud-server-b7046d390fb651e7f83b22a02ca35deefcaab6e9.zip
Remove internal share mail function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Share')
-rw-r--r--tests/lib/Share/MailNotificationsTest.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/tests/lib/Share/MailNotificationsTest.php b/tests/lib/Share/MailNotificationsTest.php
index d56efe57c9d..6fae8eb72fd 100644
--- a/tests/lib/Share/MailNotificationsTest.php
+++ b/tests/lib/Share/MailNotificationsTest.php
@@ -208,54 +208,6 @@ class MailNotificationsTest extends \Test\TestCase {
$this->assertSame(['lukas@owncloud.com'], $mailNotifications->sendLinkShareMail('lukas@owncloud.com', 'MyFile', 'https://owncloud.com/file/?foo=bar', 3600));
}
- public function testSendInternalShareMail() {
- $this->setupMailerMock('TestUser shared »welcome.txt« with you', ['recipient@owncloud.com' => 'Recipient'], false);
-
- /** @var MailNotifications | \PHPUnit_Framework_MockObject_MockObject $mailNotifications */
- $mailNotifications = $this->getMockBuilder(MailNotifications::class)
- ->setMethods(['getItemSharedWithUser'])
- ->setConstructorArgs([
- $this->user,
- $this->l10n,
- $this->mailer,
- $this->logger,
- $this->defaults,
- $this->urlGenerator
- ])
- ->getMock();
-
- $mailNotifications->method('getItemSharedWithUser')
- ->withAnyParameters()
- ->willReturn([
- ['file_target' => '/welcome.txt', 'item_source' => 123],
- ]);
-
- $recipient = $this->getMockBuilder('\OCP\IUser')
- ->disableOriginalConstructor()->getMock();
- $recipient
- ->expects($this->once())
- ->method('getEMailAddress')
- ->willReturn('recipient@owncloud.com');
- $recipient
- ->expects($this->once())
- ->method('getDisplayName')
- ->willReturn('Recipient');
-
- $this->urlGenerator->expects($this->once())
- ->method('linkToRouteAbsolute')
- ->with(
- $this->equalTo('files.viewcontroller.showFile'),
- $this->equalTo([
- 'fileId' => 123,
- ])
- );
-
- $recipientList = [$recipient];
- $result = $mailNotifications->sendInternalShareMail($recipientList, '3', 'file');
- $this->assertSame([], $result);
-
- }
-
/**
* @param string $subject
*/