Skip to content

Commit

Permalink
Use the proper default values
Browse files Browse the repository at this point in the history
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
  • Loading branch information
MorrisJobke committed Nov 19, 2018
1 parent 5ba33b7 commit 511eade
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion settings/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ protected function getCronErrors() {
}

protected function isPhpMailerUsed(): bool {
return $this->config->getSystemValue('mail_smtpmode') === 'php';
return $this->config->getSystemValue('mail_smtpmode', 'smtp') === 'php';
}

protected function hasOpcacheLoaded(): bool {
Expand Down
4 changes: 2 additions & 2 deletions tests/Settings/Controller/CheckSetupControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ public function testIsPhpMailerUsed() {

$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'));
Expand Down

0 comments on commit 511eade

Please sign in to comment.