1.20.x simpletest.module simpletest_mail_alter(&$message)

Implements hook_mail_alter().

Aborts sending of messages with ID 'simpletest_cancel_test'.

See also

MailTestCase::testCancelMessage()

File

modules/simpletest/simpletest.module, line 628
Provides testing functionality.

Code

function simpletest_mail_alter(&$message) {
  if ($message['id'] == 'simpletest_cancel_test') {
    $message['send'] = FALSE;
  }
}