Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit a80c77a

Browse files
committed
First stab at #18
1 parent d0531ce commit a80c77a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/MailTracking.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,19 @@ public function recordMail(Swift_Message $email)
103103
/**
104104
* Assert that the last email was bcc'ed to the given address.
105105
*
106-
* @param string $bcc
106+
* @param string|array $bcc_list The BCC or array of BCCs to check
107107
* @param Swift_Message|null $message
108108
*
109109
* @return $this
110110
*/
111-
protected function seeEmailBcc($bcc, Swift_Message $message = null)
111+
protected function seeEmailBcc($bcc_list, Swift_Message $message = null)
112112
{
113-
$this->assertArrayHasKey($bcc, (array)$this->getEmail($message)
114-
->getBcc(), "The last email sent was not bcc'ed to $bcc.");
113+
if (! is_array($bcc_list)) {
114+
$bcc_list = [$bcc_list];
115+
}
116+
117+
$this->arrayHasKey((array)$this->getEmail($message)
118+
->getBcc(), $bcc_list, 'The last email sent was not bcc\'ed to any of the following addresses: ' . implode(', ', $bcc_list) . '.');
115119

116120
return $this;
117121
}

0 commit comments

Comments
 (0)