protected function AssertMailTrait::verboseEmail in Drupal 9
Same name and namespace in other branches
- 8 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.
Deprecated
in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead.
See also
https://www.drupal.org/node/3197514
File
- core/
lib/ Drupal/ Core/ Test/ AssertMailTrait.php, line 152
Class
- AssertMailTrait
- Provides methods for testing emails sent during test runs.
Namespace
Drupal\Core\TestCode
protected function verboseEmail($count = 1) {
@trigger_error('AssertMailTrait::verboseEmail() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead. See https://www.drupal.org/node/3197514', E_USER_DEPRECATED);
$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>');
}
}