diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-03 23:23:57 +0300 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-10-03 23:23:57 +0300 |
commit | 0bd482bd2d841bf02f6a22f86502996498964a24 (patch) | |
tree | 9b17a6c2769d5a8beba1909d2f724ca5a33023e1 | |
parent | 4802ed11160effd9d779c97391d05114209ab473 (diff) |
Fix 2 more tests in Mailer
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | tests/lib/Mail/MailerTest.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index fe89c337a07..06bb7bab387 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -150,6 +150,20 @@ class MailerTest extends TestCase { ['mail_smtphost', '127.0.0.1', '127.0.0.1'], ['mail_smtpport', 25, 25], ]); + $this->mailer = $this->getMockBuilder(Mailer::class) + ->setMethods(['getInstance']) + ->setConstructorArgs( + [ + $this->config, + $this->logger, + $this->defaults, + $this->urlGenerator, + $this->l10n, + $this->dispatcher, + $this->createMock(IFactory::class) + ] + ) + ->getMock(); $message = $this->createMock(Message::class); @@ -172,6 +186,12 @@ class MailerTest extends TestCase { public function testSendInvalidMailException() { + $this->config + ->method('getSystemValue') + ->willReturnMap([ + ['mail_smtphost', '127.0.0.1', '127.0.0.1'], + ['mail_smtpport', 25, 25], + ]); $this->expectException(\Exception::class); $message = $this->getMockBuilder('\OC\Mail\Message') |