summaryrefslogtreecommitdiffstats
path: root/apps/settings/tests/Settings/Admin/MailTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/tests/Settings/Admin/MailTest.php')
-rw-r--r--apps/settings/tests/Settings/Admin/MailTest.php67
1 files changed, 14 insertions, 53 deletions
diff --git a/apps/settings/tests/Settings/Admin/MailTest.php b/apps/settings/tests/Settings/Admin/MailTest.php
index 5fd3f1600c5..7a70065ff50 100644
--- a/apps/settings/tests/Settings/Admin/MailTest.php
+++ b/apps/settings/tests/Settings/Admin/MailTest.php
@@ -55,60 +55,21 @@ class MailTest extends TestCase {
public function testGetForm() {
$this->config
- ->expects($this->at(0))
+ ->expects($this->any())
->method('getSystemValue')
- ->with('mail_domain', '')
- ->willReturn('mx.nextcloud.com');
- $this->config
- ->expects($this->at(1))
- ->method('getSystemValue')
- ->with('mail_from_address', '')
- ->willReturn('no-reply@nextcloud.com');
- $this->config
- ->expects($this->at(2))
- ->method('getSystemValue')
- ->with('mail_smtpmode', '')
- ->willReturn('smtp');
- $this->config
- ->expects($this->at(3))
- ->method('getSystemValue')
- ->with('mail_smtpsecure', '')
- ->willReturn(true);
- $this->config
- ->expects($this->at(4))
- ->method('getSystemValue')
- ->with('mail_smtphost', '')
- ->willReturn('smtp.nextcloud.com');
- $this->config
- ->expects($this->at(5))
- ->method('getSystemValue')
- ->with('mail_smtpport', '')
- ->willReturn(25);
- $this->config
- ->expects($this->at(6))
- ->method('getSystemValue')
- ->with('mail_smtpauthtype', '')
- ->willReturn('login');
- $this->config
- ->expects($this->at(7))
- ->method('getSystemValue')
- ->with('mail_smtpauth', false)
- ->willReturn(true);
- $this->config
- ->expects($this->at(8))
- ->method('getSystemValue')
- ->with('mail_smtpname', '')
- ->willReturn('smtp.sender.com');
- $this->config
- ->expects($this->at(9))
- ->method('getSystemValue')
- ->with('mail_smtppassword', '')
- ->willReturn('mypassword');
- $this->config
- ->expects($this->at(10))
- ->method('getSystemValue')
- ->with('mail_sendmailmode', 'smtp')
- ->willReturn('smtp');
+ ->willReturnMap([
+ ['mail_domain', '', 'mx.nextcloud.com'],
+ ['mail_from_address', '', 'no-reply@nextcloud.com'],
+ ['mail_smtpmode', '', 'smtp'],
+ ['mail_smtpsecure', '', true],
+ ['mail_smtphost', '', 'smtp.nextcloud.com'],
+ ['mail_smtpport', '', 25],
+ ['mail_smtpauthtype', '', 'login'],
+ ['mail_smtpauth', false, true],
+ ['mail_smtpname', '', 'smtp.sender.com'],
+ ['mail_smtppassword', '', 'mypassword'],
+ ['mail_sendmailmode', 'smtp', 'smtp'],
+ ]);
$expected = new TemplateResponse(
'settings',