You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Hello
for now
TestEmail::assertTo
allows for checking that only 1 email address belongs in theTo:
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:
maybe
final public function assertTo(string $expectedEmail, ?string $expectedName = null): self
could have a friend sibling methodassertToAddresses(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.
The text was updated successfully, but these errors were encountered: