-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hello
for now TestEmail::assertTo
allows for checking that only 1 email address belongs in the To:
recipients email addresses list.
So if I want to check that my e-mail goes to three specific email addresses, I have to call assertTo 3 three times, then check a count as follows:
foreach($effectiveToEmailAddresses as $effectiveToEmailAddress) {
$sentEmail->assertTo($effectiveToEmailAddress);
}
$this->assertCount(count($effectiveToEmailAddresses), $sentEmail->getTo());
maybe final public function assertTo(string $expectedEmail, ?string $expectedName = null): self
could have a friend sibling method assertToAddresses(Address[]|array $expectedAddresses, bool $strict = true): self
where the $strict
ensures that the recipient addresses set is exactly that of $expectedAddresses
, instead of just checking for a subset inclusion (ie. expected addresses belong in actual addresses).
This is not blocking... Just ideating.
Metadata
Metadata
Assignees
Labels
No labels