Don't try to use the mail() function if it's not available, should fix Travis-CI builds.

This commit is contained in:
Synchro 2013-02-28 18:29:55 +01:00
parent dfc40d56ce
commit 8ad881fb30
1 changed files with 8 additions and 6 deletions

View File

@ -931,13 +931,15 @@ EOT;
*/
function test_MailSend()
{
$this->Mail->Body = "Sending via mail()";
$this->BuildBody();
$subject = $this->Mail->Subject;
if (function_exists('mail')) { //Mail is disabled in Travis-CI, so check before trying to use it
$this->Mail->Body = "Sending via mail()";
$this->BuildBody();
$subject = $this->Mail->Subject;
$this->Mail->Subject = $subject . ": mail()";
$this->Mail->IsMail();
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
$this->Mail->Subject = $subject . ": mail()";
$this->Mail->IsMail();
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
}
}
/**