summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-06-12 17:52:52 -0500
committerGitHub <noreply@github.com>2017-06-12 17:52:52 -0500
commitaa243376ef64c3c693c35bde11335a353ca15a57 (patch)
tree0699bff940ea15815a105e9a512f4884620aadde /tests
parent69b65042858eb8436a91af511c5e77cfeefff924 (diff)
parenta4b48d55ad9bc81e8795aa19c0af0f79956cf222 (diff)
downloadnextcloud-server-aa243376ef64c3c693c35bde11335a353ca15a57.tar.gz
nextcloud-server-aa243376ef64c3c693c35bde11335a353ca15a57.zip
Merge pull request #5271 from nextcloud/use-mailer-to-create-email-template
Also use IMailer interface to generate the email template
Diffstat (limited to 'tests')
-rw-r--r--tests/Settings/Mailer/NewUserMailHelperTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Settings/Mailer/NewUserMailHelperTest.php b/tests/Settings/Mailer/NewUserMailHelperTest.php
index fee47625cfd..a8b67278e77 100644
--- a/tests/Settings/Mailer/NewUserMailHelperTest.php
+++ b/tests/Settings/Mailer/NewUserMailHelperTest.php
@@ -21,6 +21,7 @@
namespace Tests\Settings\Mailer;
+use OC\Mail\EMailTemplate;
use OCP\Mail\IEMailTemplate;
use OC\Mail\Message;
use OC\Settings\Mailer\NewUserMailHelper;
@@ -62,6 +63,13 @@ class NewUserMailHelperTest extends TestCase {
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->l10n = $this->createMock(IL10N::class);
$this->mailer = $this->createMock(IMailer::class);
+ $template = new EMailTemplate(
+ $this->defaults,
+ $this->urlGenerator,
+ $this->l10n
+ );
+ $this->mailer->method('createEMailTemplate')
+ ->will($this->returnValue($template));
$this->secureRandom = $this->createMock(ISecureRandom::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);