Skip to content

Commit

Permalink
fixup! Provide the proper language to the mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
rullzer committed Apr 13, 2020
1 parent 2b51138 commit 673a5b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/lib/Mail/EMailTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
use OCP\Defaults;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
use Test\TestCase;

class EMailTemplateTest extends TestCase {
/** @var Defaults|\PHPUnit_Framework_MockObject_MockObject */
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;
Expand All @@ -44,7 +45,11 @@ protected function setUp(): void {

$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,
Expand Down

0 comments on commit 673a5b6

Please sign in to comment.