summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-06-06 10:01:53 -0500
committerMorris Jobke <hey@morrisjobke.de>2017-06-06 10:47:48 -0500
commitb58928b4c1a21f0c2f7db6a8ff670645e7c867e0 (patch)
treedff8214b5d2ca596bf883eb66ceae43e1ba2418d /tests
parent15314b6f5b7914a72ca1b424a13ecd82163a8f14 (diff)
downloadnextcloud-server-b58928b4c1a21f0c2f7db6a8ff670645e7c867e0.tar.gz
nextcloud-server-b58928b4c1a21f0c2f7db6a8ff670645e7c867e0.zip
Also use IMailer interface to generate the email template
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
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..8014570636d 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->return($template));
$this->secureRandom = $this->createMock(ISecureRandom::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->config = $this->createMock(IConfig::class);