function AssertMailTrait::verboseEmail
Same name in other branches
- 9 core/lib/Drupal/Core/Test/AssertMailTrait.php \Drupal\Core\Test\AssertMailTrait::verboseEmail()
Outputs to verbose the most recent $count emails sent.
Parameters
int $count: Optional number of emails to output.
File
-
core/
lib/ Drupal/ Core/ Test/ AssertMailTrait.php, line 150
Class
- AssertMailTrait
- Provides methods for testing emails sent during test runs.
Namespace
Drupal\Core\TestCode
protected function verboseEmail($count = 1) {
$mails = $this->getMails();
for ($i = count($mails) - 1; $i >= count($mails) - $count && $i >= 0; $i--) {
$mail = $mails[$i];
$this->verbose('Email:<pre>' . print_r($mail, TRUE) . '</pre>');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.