From 3119fd41ceebbdab33c4dd86ce0b60b4dc9010e9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 Sep 2017 11:01:21 +0200 Subject: Set the data from the template Signed-off-by: Joas Schilling --- apps/sharebymail/tests/ShareByMailProviderTest.php | 40 +++++----------------- 1 file changed, 8 insertions(+), 32 deletions(-) (limited to 'apps/sharebymail/tests') 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') -- cgit v1.2.3