From: Joas Schilling Date: Tue, 18 Apr 2017 14:11:29 +0000 (+0200) Subject: Fix some more stuff X-Git-Tag: v12.0.0beta1~140^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fcaa315c96e236079d71236af67b5237e426b0f9;p=nextcloud-server.git Fix some more stuff Signed-off-by: Joas Schilling --- diff --git a/settings/Controller/MailSettingsController.php b/settings/Controller/MailSettingsController.php index caba4bad0b0..f0fd7a52f0b 100644 --- a/settings/Controller/MailSettingsController.php +++ b/settings/Controller/MailSettingsController.php @@ -1,5 +1,6 @@ * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Joas Schilling diff --git a/tests/Settings/Controller/MailSettingsControllerTest.php b/tests/Settings/Controller/MailSettingsControllerTest.php index b6131e80c5d..c8f9e476801 100644 --- a/tests/Settings/Controller/MailSettingsControllerTest.php +++ b/tests/Settings/Controller/MailSettingsControllerTest.php @@ -1,7 +1,10 @@ + * + * @author Lukas Reschke + * @author Joas Schilling * * This file is licensed under the Affero General Public License version 3 or * later. @@ -44,14 +47,16 @@ class MailSettingsControllerTest extends \Test\TestCase { $this->config = $this->createMock(IConfig::class); $this->userSession = $this->createMock(IUserSession::class); $this->mailer = $this->createMock(IMailer::class); + /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject $request */ + $request = $this->createMock(IRequest::class); $this->mailController = new MailSettingsController( 'settings', - $this->createMock(IRequest::class), + $request, $this->l, $this->config, $this->userSession, $this->mailer, - 'no-reply@owncloud.com' + 'no-reply@nextcloud.com' ); } @@ -60,21 +65,21 @@ class MailSettingsControllerTest extends \Test\TestCase { ->method('setSystemValues') ->withConsecutive( [[ - 'mail_domain' => 'owncloud.com', - 'mail_from_address' => 'demo@owncloud.com', + 'mail_domain' => 'nextcloud.com', + 'mail_from_address' => 'demo@nextcloud.com', 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'ssl', - 'mail_smtphost' => 'mx.owncloud.org', + 'mail_smtphost' => 'mx.nextcloud.org', 'mail_smtpauthtype' => 'NTLM', 'mail_smtpauth' => 1, 'mail_smtpport' => '25', ]], [[ - 'mail_domain' => 'owncloud.com', - 'mail_from_address' => 'demo@owncloud.com', + 'mail_domain' => 'nextcloud.com', + 'mail_from_address' => 'demo@nextcloud.com', 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'ssl', - 'mail_smtphost' => 'mx.owncloud.org', + 'mail_smtphost' => 'mx.nextcloud.org', 'mail_smtpauthtype' => 'NTLM', 'mail_smtpauth' => null, 'mail_smtpport' => '25', @@ -85,11 +90,11 @@ class MailSettingsControllerTest extends \Test\TestCase { // With authentication $response = $this->mailController->setMailSettings( - 'owncloud.com', - 'demo@owncloud.com', + 'nextcloud.com', + 'demo@nextcloud.com', 'smtp', 'ssl', - 'mx.owncloud.org', + 'mx.nextcloud.org', 'NTLM', 1, '25' @@ -98,11 +103,11 @@ class MailSettingsControllerTest extends \Test\TestCase { // Without authentication (testing the deletion of the stored password) $response = $this->mailController->setMailSettings( - 'owncloud.com', - 'demo@owncloud.com', + 'nextcloud.com', + 'demo@nextcloud.com', 'smtp', 'ssl', - 'mx.owncloud.org', + 'mx.nextcloud.org', 'NTLM', 0, '25'