MDL-41196 phpmailer: fixed unit test detection

This commit is contained in:
Sam Hemelryk
2013-08-22 14:46:26 +12:00
parent 695969987a
commit ba214fa54c
+1 -1
View File
@@ -135,7 +135,7 @@ class moodle_phpmailer extends PHPMailer {
*/
protected function PostSend() {
// Now ask phpunit if it wants to catch this message.
if (phpunit_util::is_redirecting_messages()) {
if (PHPUNIT_TEST && phpunit_util::is_redirecting_messages()) {
$mail = new stdClass();
$mail->header = $this->MIMEHeader;
$mail->body = $this->MIMEBody;