Merge pull request #10558 from creative-commoners/pulls/5/broken-builds

This commit is contained in:
Michal Kleiner 2022-10-21 18:46:41 +13:00 committed by GitHub
commit e11216d8ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,12 @@ class TestMailer implements MailerInterface
/** @var Email $email */ /** @var Email $email */
$email = $message; $email = $message;
$this->dispatchEvent($email, $envelope); $this->dispatchEvent($email, $envelope);
$this->emailsSent[] = [ $this->emailsSent[] = $this->createData($email);
}
protected function createData(Email $email): array
{
return [
'Type' => $email->getHtmlBody() ? 'html' : 'plain', 'Type' => $email->getHtmlBody() ? 'html' : 'plain',
'To' => $this->convertAddressesToString($email->getTo()), 'To' => $this->convertAddressesToString($email->getTo()),
'From' => $this->convertAddressesToString($email->getFrom()), 'From' => $this->convertAddressesToString($email->getFrom()),