You are here

protected function DrupalWebTestCase::verboseEmail in SimpleTest 7.2

Same name and namespace in other branches
  1. 6.2 drupal_web_test_case.php \DrupalWebTestCase::verboseEmail()

Outputs to verbose the most recent $count emails sent.

Parameters

$count: Optional number of emails to output.

File

./drupal_web_test_case.php, line 3411
Provides DrupalTestCase, DrupalUnitTestCase, and DrupalWebTestCase classes.

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function verboseEmail($count = 1) {
  $mails = $this
    ->drupalGetMails();
  for ($i = sizeof($mails) - 1; $i >= sizeof($mails) - $count && $i >= 0; $i--) {
    $mail = $mails[$i];
    $this
      ->verbose(t('Email:') . '<pre>' . print_r($mail, TRUE) . '</pre>');
  }
}