You are here

function PrivatemsgEMailNotifyTestCase::verifyMails in Privatemsg 7.2

Same name and namespace in other branches
  1. 6.2 pm_email_notify/pm_email_notify.test \PrivatemsgEMailNotifyTestCase::verifyMails()

Verify multiple notification mails

Parameters

$recipients: Array of recipients in the order in which they received their mail.

$author: Author user object.

$message: Message array, containing the keys thread_id, body and subject.

$expectedFrom: The mail address expected to be the notification origin (optional).

6 calls to PrivatemsgEMailNotifyTestCase::verifyMails()
PrivatemsgEMailNotifyTestCase::testAlwaysConfiguration in pm_email_notify/pm_email_notify.test
Test Always configuration.
PrivatemsgEMailNotifyTestCase::testNeverConfiguration in pm_email_notify/pm_email_notify.test
Test that no mails are sent when
PrivatemsgEMailNotifyTestCase::testOnlyUserConfiguration in pm_email_notify/pm_email_notify.test
Test Always configuration.
PrivatemsgEMailNotifyTestCase::testShowSenderMail in pm_email_notify/pm_email_notify.test
Test the "author's email address as notification sender" feature.
PrivatemsgEMailNotifyTestCase::testThreadConfiguration in pm_email_notify/pm_email_notify.test
Test Always configuration.

... See full list

File

pm_email_notify/pm_email_notify.test, line 491
Test file for pm_email_notify.module

Class

PrivatemsgEMailNotifyTestCase
@file Test file for pm_email_notify.module

Code

function verifyMails($recipients, $author, $message, $expectedFrom = NULL) {
  drupal_static_reset('privatemsg_thread_load');
  $mails = $this
    ->getNewMails(count($recipients));
  foreach ($recipients as $id => $recipient) {
    $this
      ->verifyMail($mails[$id], $recipient, $author, $message, $expectedFrom);
  }
}