summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-11-02 16:17:02 +0100
committerGitHub <noreply@github.com>2018-11-02 16:17:02 +0100
commit4ba709bb7174c260c29e728dfe623c007c1ffc56 (patch)
tree5b3edd4ee00029cc3de4133f818668f42461d0be /tests
parent30a1237f8115683fc375395d842f3f4fc555b1e0 (diff)
parent054056a8df9b5fd6651db7fbe771ca04ba37761a (diff)
downloadnextcloud-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.php8
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() {