Fix some more stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
dfca672378
commit
fcaa315c96
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
|
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
|
||||||
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
* @copyright Copyright (c) 2016, ownCloud, Inc.
|
||||||
*
|
*
|
||||||
* @author Joas Schilling <coding@schilljs.com>
|
* @author Joas Schilling <coding@schilljs.com>
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @author Lukas Reschke
|
* @copyright 2014 Lukas Reschke lukas@nextcloud.com
|
||||||
* @copyright 2014 Lukas Reschke lukas@owncloud.com
|
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
|
||||||
|
*
|
||||||
|
* @author Lukas Reschke <lukas@statuscode.ch>
|
||||||
|
* @author Joas Schilling <coding@schilljs.com>
|
||||||
*
|
*
|
||||||
* This file is licensed under the Affero General Public License version 3 or
|
* This file is licensed under the Affero General Public License version 3 or
|
||||||
* later.
|
* later.
|
||||||
|
@ -44,14 +47,16 @@ class MailSettingsControllerTest extends \Test\TestCase {
|
||||||
$this->config = $this->createMock(IConfig::class);
|
$this->config = $this->createMock(IConfig::class);
|
||||||
$this->userSession = $this->createMock(IUserSession::class);
|
$this->userSession = $this->createMock(IUserSession::class);
|
||||||
$this->mailer = $this->createMock(IMailer::class);
|
$this->mailer = $this->createMock(IMailer::class);
|
||||||
|
/** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */
|
||||||
|
$request = $this->createMock(IRequest::class);
|
||||||
$this->mailController = new MailSettingsController(
|
$this->mailController = new MailSettingsController(
|
||||||
'settings',
|
'settings',
|
||||||
$this->createMock(IRequest::class),
|
$request,
|
||||||
$this->l,
|
$this->l,
|
||||||
$this->config,
|
$this->config,
|
||||||
$this->userSession,
|
$this->userSession,
|
||||||
$this->mailer,
|
$this->mailer,
|
||||||
'no-reply@owncloud.com'
|
'no-reply@nextcloud.com'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,21 +65,21 @@ class MailSettingsControllerTest extends \Test\TestCase {
|
||||||
->method('setSystemValues')
|
->method('setSystemValues')
|
||||||
->withConsecutive(
|
->withConsecutive(
|
||||||
[[
|
[[
|
||||||
'mail_domain' => 'owncloud.com',
|
'mail_domain' => 'nextcloud.com',
|
||||||
'mail_from_address' => 'demo@owncloud.com',
|
'mail_from_address' => 'demo@nextcloud.com',
|
||||||
'mail_smtpmode' => 'smtp',
|
'mail_smtpmode' => 'smtp',
|
||||||
'mail_smtpsecure' => 'ssl',
|
'mail_smtpsecure' => 'ssl',
|
||||||
'mail_smtphost' => 'mx.owncloud.org',
|
'mail_smtphost' => 'mx.nextcloud.org',
|
||||||
'mail_smtpauthtype' => 'NTLM',
|
'mail_smtpauthtype' => 'NTLM',
|
||||||
'mail_smtpauth' => 1,
|
'mail_smtpauth' => 1,
|
||||||
'mail_smtpport' => '25',
|
'mail_smtpport' => '25',
|
||||||
]],
|
]],
|
||||||
[[
|
[[
|
||||||
'mail_domain' => 'owncloud.com',
|
'mail_domain' => 'nextcloud.com',
|
||||||
'mail_from_address' => 'demo@owncloud.com',
|
'mail_from_address' => 'demo@nextcloud.com',
|
||||||
'mail_smtpmode' => 'smtp',
|
'mail_smtpmode' => 'smtp',
|
||||||
'mail_smtpsecure' => 'ssl',
|
'mail_smtpsecure' => 'ssl',
|
||||||
'mail_smtphost' => 'mx.owncloud.org',
|
'mail_smtphost' => 'mx.nextcloud.org',
|
||||||
'mail_smtpauthtype' => 'NTLM',
|
'mail_smtpauthtype' => 'NTLM',
|
||||||
'mail_smtpauth' => null,
|
'mail_smtpauth' => null,
|
||||||
'mail_smtpport' => '25',
|
'mail_smtpport' => '25',
|
||||||
|
@ -85,11 +90,11 @@ class MailSettingsControllerTest extends \Test\TestCase {
|
||||||
|
|
||||||
// With authentication
|
// With authentication
|
||||||
$response = $this->mailController->setMailSettings(
|
$response = $this->mailController->setMailSettings(
|
||||||
'owncloud.com',
|
'nextcloud.com',
|
||||||
'demo@owncloud.com',
|
'demo@nextcloud.com',
|
||||||
'smtp',
|
'smtp',
|
||||||
'ssl',
|
'ssl',
|
||||||
'mx.owncloud.org',
|
'mx.nextcloud.org',
|
||||||
'NTLM',
|
'NTLM',
|
||||||
1,
|
1,
|
||||||
'25'
|
'25'
|
||||||
|
@ -98,11 +103,11 @@ class MailSettingsControllerTest extends \Test\TestCase {
|
||||||
|
|
||||||
// Without authentication (testing the deletion of the stored password)
|
// Without authentication (testing the deletion of the stored password)
|
||||||
$response = $this->mailController->setMailSettings(
|
$response = $this->mailController->setMailSettings(
|
||||||
'owncloud.com',
|
'nextcloud.com',
|
||||||
'demo@owncloud.com',
|
'demo@nextcloud.com',
|
||||||
'smtp',
|
'smtp',
|
||||||
'ssl',
|
'ssl',
|
||||||
'mx.owncloud.org',
|
'mx.nextcloud.org',
|
||||||
'NTLM',
|
'NTLM',
|
||||||
0,
|
0,
|
||||||
'25'
|
'25'
|
||||||
|
|
Loading…
Reference in New Issue