diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-03-31 15:02:39 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-04-16 10:04:13 +0300 |
commit | bb4dedb0156727ebd88a3f922fedc78436d7b701 (patch) | |
tree | e1975ad11d4d3903c6c1520f93a1a398f80ac1b6 /tests/lib/Mail/EMailTemplateTest.php | |
parent | 078ac97939747eec246ed105830d4643b81d994c (diff) |
Provide the proper language to the mailer
Else we can't properly translate the footer in the recipients e-mail
language.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Mail/EMailTemplateTest.php')
-rw-r--r-- | tests/lib/Mail/EMailTemplateTest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index 4b4ff616d4e..a900b1fe47d 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -27,6 +27,7 @@ use OC\Mail\EMailTemplate; use OCP\Defaults; use OCP\IL10N; use OCP\IURLGenerator; +use OCP\L10N\IFactory; use Test\TestCase; class EMailTemplateTest extends TestCase { @@ -34,7 +35,7 @@ class EMailTemplateTest extends TestCase { private $defaults; /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; - /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */ private $l10n; /** @var EMailTemplate */ private $emailTemplate; @@ -44,7 +45,11 @@ class EMailTemplateTest extends TestCase { $this->defaults = $this->createMock(Defaults::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); - $this->l10n = $this->createMock(IL10N::class); + $this->l10n = $this->createMock(IFactory::class); + + $this->l10n->method('get') + ->with('lib', '') + ->willReturn($this->createMock(IL10N::class)); $this->emailTemplate = new EMailTemplate( $this->defaults, |