AssertMailTrait
trait AssertMailTrait (View source)
Provides methods for testing emails sent during test runs.
Methods
Gets an array containing all emails sent during this test case.
Asserts that the most recently sent email message has the given value.
Asserts that the most recently sent email message has the string in it.
Asserts that the most recently sent email message has the pattern in it.
Details
protected array
getMails(array $filter = [])
Gets an array containing all emails sent during this test case.
protected bool
assertMail(string $name, string $value = '', string $message = '', string $group = 'Email')
Asserts that the most recently sent email message has the given value.
The field in $name must have the content described in $value.
protected
assertMailString(string $field_name, string $string, int $email_depth, string $message = '', string $group = 'Other')
Asserts that the most recently sent email message has the string in it.
protected
assertMailPattern(string $field_name, string $regex, string $message = '', string $group = 'Other')
Asserts that the most recently sent email message has the pattern in it.
protected
verboseEmail(int $count = 1)
deprecated
deprecated
Outputs to verbose the most recent $count emails sent.