You are here

function PrivatemsgEMailNotifyTestCase::verifyMails in Privatemsg 6.2

Same name and namespace in other branches
  1. 7.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 492
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) {
  $mails = $this
    ->getNewMails(count($recipients));
  foreach ($recipients as $id => $recipient) {
    $this
      ->verifyMail($mails[$id], $recipient, $author, $message, $expectedFrom);
  }
}