]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the proper default values 12529/head
authorMorris Jobke <hey@morrisjobke.de>
Mon, 19 Nov 2018 09:57:51 +0000 (10:57 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 19 Nov 2018 14:49:49 +0000 (15:49 +0100)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
settings/Controller/CheckSetupController.php
tests/Settings/Controller/CheckSetupControllerTest.php

index 57766f26724963c3fba6b63c6c905b249143f281..224c0cb30d3abc3fe74530c3c78ccabaf78135e9 100644 (file)
@@ -529,7 +529,7 @@ Raw output
        }
 
        protected function isPhpMailerUsed(): bool {
-               return $this->config->getSystemValue('mail_smtpmode') === 'php';
+               return $this->config->getSystemValue('mail_smtpmode', 'smtp') === 'php';
        }
 
        protected function hasOpcacheLoaded(): bool {
index 8da90b91bfd24cc54a9a523c983b344fcedfd4c2..20184251d206d607a8658261bfd2a6b81edc5ad2 100644 (file)
@@ -533,11 +533,11 @@ class CheckSetupControllerTest extends TestCase {
 
                $this->config->expects($this->at(0))
                        ->method('getSystemValue')
-                       ->with('mail_smtpmode', null)
+                       ->with('mail_smtpmode', 'smtp')
                        ->will($this->returnValue('php'));
                $this->config->expects($this->at(1))
                        ->method('getSystemValue')
-                       ->with('mail_smtpmode', null)
+                       ->with('mail_smtpmode', 'smtp')
                        ->will($this->returnValue('not-php'));
 
                $this->assertTrue($this->invokePrivate($checkSetupController, 'isPhpMailerUsed'));