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 --- tests/Settings/Mailer/NewUserMailHelperTest.php | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'tests/Settings') diff --git a/tests/Settings/Mailer/NewUserMailHelperTest.php b/tests/Settings/Mailer/NewUserMailHelperTest.php index 1af1bed808c..9fd90561127 100644 --- a/tests/Settings/Mailer/NewUserMailHelperTest.php +++ b/tests/Settings/Mailer/NewUserMailHelperTest.php @@ -620,26 +620,18 @@ EOF; ->expects($this->at(0)) ->method('setTo') ->with(['recipient@example.com' => 'John Doe']); - $this->defaults - ->expects($this->exactly(2)) - ->method('getName') - ->willReturn('TestCloud'); $message ->expects($this->at(1)) - ->method('setSubject') - ->with('Your TestCloud account was created'); - $message - ->expects($this->at(2)) - ->method('setHtmlBody') - ->with($emailTemplate->renderHtml()); - $message - ->expects($this->at(3)) - ->method('setPlainBody') - ->with($emailTemplate->renderText()); - $message - ->expects($this->at(4)) ->method('setFrom') ->with(['no-reply@nextcloud.com' => 'TestCloud']); + $message + ->expects($this->at(2)) + ->method('useTemplate') + ->with($emailTemplate); + $this->defaults + ->expects($this->exactly(1)) + ->method('getName') + ->willReturn('TestCloud'); $this->mailer ->expects($this->once()) ->method('createMessage') -- cgit v1.2.3