diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-11-02 16:17:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 16:17:02 +0100 |
commit | 4ba709bb7174c260c29e728dfe623c007c1ffc56 (patch) | |
tree | 5b3edd4ee00029cc3de4133f818668f42461d0be /tests | |
parent | 30a1237f8115683fc375395d842f3f4fc555b1e0 (diff) | |
parent | 054056a8df9b5fd6651db7fbe771ca04ba37761a (diff) | |
download | nextcloud-server-4ba709bb7174c260c29e728dfe623c007c1ffc56.tar.gz nextcloud-server-4ba709bb7174c260c29e728dfe623c007c1ffc56.zip |
Merge pull request #11404 from flokli/sendmail-path
Mailer: discover sendmail path instead of hardcoding it to /usr/sbin/sendmail
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Mail/MailerTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index d724cd630d3..ddae38ff54d 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -55,7 +55,13 @@ class MailerTest extends TestCase { ->with('mail_smtpmode', 'smtp') ->will($this->returnValue('sendmail')); - $this->assertEquals(new \Swift_SendmailTransport('/usr/sbin/sendmail -bs'), self::invokePrivate($this->mailer, 'getSendMailInstance')); + $path = \OC_Helper::findBinaryPath('sendmail'); + if ($path === null) { + $path = '/usr/sbin/sendmail'; + } + + $expected = new \Swift_SendmailTransport($path . ' -bs'); + $this->assertEquals($expected, self::invokePrivate($this->mailer, 'getSendMailInstance')); } public function testGetSendMailInstanceSendMailQmail() { |