mail_cancel_test.module

Same filename in other branches
  1. 9 core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module
  2. 10 core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module
  3. 11.x core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module

Helper module for the catching mail that needs to be cancelled.

File

core/modules/system/tests/modules/mail_cancel_test/mail_cancel_test.module

View source
<?php


/**
 * @file
 * Helper module for the catching mail that needs to be cancelled.
 */

/**
 * Implements hook_mail_alter().
 *
 * Aborts sending of messages with ID 'mail_cancel_test_cancel_test'.
 *
 * @see MailTestCase::testCancelMessage()
 */
function mail_cancel_test_mail_alter(&$message) {
    if ($message['id'] == 'mail_cancel_test_cancel_test') {
        $message['send'] = FALSE;
    }
}

Functions

Title Deprecated Summary
mail_cancel_test_mail_alter Implements hook_mail_alter().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.