You are here

function QueueMailTestCase::testQueuedEmailKeyMatching in Queue Mail 7

This tests the matching of mailkeys to be queued.

For example, we test that a specific email from a module is queued, and that emails from another module are not queued.

File

./queue_mail.test, line 54
Simpletests for the Queue Mail module.

Class

QueueMailTestCase
Tests queue mail functionality.

Code

function testQueuedEmailKeyMatching() {

  // Set only some emails to be queued and test.
  variable_set('queue_mail_keys', 'queue_mail_test_queued');
  $this
    ->sendEmailAndTest('queued', TRUE);
  $this
    ->sendEmailAndTest('not_queued', FALSE);

  // And test the wildcard matching.
  variable_set('queue_mail_keys', 'queue_mail_test_que*');
  $this
    ->sendEmailAndTest('queued', TRUE);
  $this
    ->sendEmailAndTest('not_queued', FALSE);
}