diff options
author | Joas Schilling <coding@schilljs.com> | 2017-10-18 15:41:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-18 15:41:18 +0200 |
commit | bea04d12d5a9ae8653277fc6379468d990f397ea (patch) | |
tree | 8b6b34a0e4a5f822fa5e451462fe5fe67fafceb0 /apps/sharebymail/tests/ShareByMailProviderTest.php | |
parent | 8e884ba52fe3796d0da1e108a7a8fb1b43e6d554 (diff) | |
parent | cc798fd65f48e4cfc4748f35859c453a6eff4e25 (diff) | |
download | nextcloud-server-bea04d12d5a9ae8653277fc6379468d990f397ea.tar.gz nextcloud-server-bea04d12d5a9ae8653277fc6379468d990f397ea.zip |
Merge pull request #6515 from nextcloud/templating-of-email-subjects
Allow templating of email subjects
Diffstat (limited to 'apps/sharebymail/tests/ShareByMailProviderTest.php')
-rw-r--r-- | apps/sharebymail/tests/ShareByMailProviderTest.php | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 23e61ee58f1..68a645ec0e6 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -835,26 +835,14 @@ class ShareByMailProviderTest extends TestCase { ->expects($this->once()) ->method('addFooter') ->with('UnitTestCloud - Testing like 1990'); - $message - ->expects($this->once()) - ->method('setSubject') - ->willReturn('Mrs. Owner User shared »file.txt« with you'); $template ->expects($this->once()) - ->method('renderText') - ->willReturn('Text Render'); - $message - ->expects($this->once()) - ->method('setPlainBody') - ->with('Text Render'); - $template - ->expects($this->once()) - ->method('renderHtml') - ->willReturn('HTML Render'); + ->method('setSubject') + ->with('Mrs. Owner User shared »file.txt« with you'); $message ->expects($this->once()) - ->method('setHtmlBody') - ->with('HTML Render'); + ->method('useTemplate') + ->with($template); $this->mailer ->expects($this->once()) ->method('send') @@ -936,26 +924,14 @@ class ShareByMailProviderTest extends TestCase { ->expects($this->once()) ->method('addFooter') ->with(''); - $message - ->expects($this->once()) - ->method('setSubject') - ->willReturn('Mr. Initiator User shared »file.txt« with you'); $template ->expects($this->once()) - ->method('renderText') - ->willReturn('Text Render'); - $message - ->expects($this->once()) - ->method('setPlainBody') - ->with('Text Render'); - $template - ->expects($this->once()) - ->method('renderHtml') - ->willReturn('HTML Render'); + ->method('setSubject') + ->with('Mr. Initiator User shared »file.txt« with you'); $message ->expects($this->once()) - ->method('setHtmlBody') - ->with('HTML Render'); + ->method('useTemplate') + ->with($template); $this->mailer ->expects($this->once()) ->method('send') |