]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix some more stuff
authorJoas Schilling <coding@schilljs.com>
Tue, 18 Apr 2017 14:11:29 +0000 (16:11 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 18 Apr 2017 14:11:29 +0000 (16:11 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
settings/Controller/MailSettingsController.php
tests/Settings/Controller/MailSettingsControllerTest.php

index caba4bad0b06d080e016b460cbdac3a6044e6971..f0fd7a52f0b9e0e8522b102ae245f3c832400c7e 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 /**
+ * @copyright Copyright (c) 2017  Joas Schilling <coding@schilljs.com>
  * @copyright Copyright (c) 2016, ownCloud, Inc.
  *
  * @author Joas Schilling <coding@schilljs.com>
index b6131e80c5d7cd93bf45a765305b17877a274eda..c8f9e476801df684536eae8cb8b75f9805a1c2cf 100644 (file)
@@ -1,7 +1,10 @@
 <?php
 /**
- * @author Lukas Reschke
- * @copyright 2014 Lukas Reschke lukas@owncloud.com
+ * @copyright 2014 Lukas Reschke lukas@nextcloud.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
  * 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'