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

Commit

Permalink
First stab at #18
Browse files Browse the repository at this point in the history
  • Loading branch information
ssfinney committed Mar 22, 2018
1 parent d0531ce commit a80c77a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/MailTracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,19 @@ public function recordMail(Swift_Message $email)
/**
* Assert that the last email was bcc'ed to the given address.
*
* @param string $bcc
* @param string|array $bcc_list The BCC or array of BCCs to check
* @param Swift_Message|null $message
*
* @return $this
*/
protected function seeEmailBcc($bcc, Swift_Message $message = null)
protected function seeEmailBcc($bcc_list, Swift_Message $message = null)
{
$this->assertArrayHasKey($bcc, (array)$this->getEmail($message)
->getBcc(), "The last email sent was not bcc'ed to $bcc.");
if (! is_array($bcc_list)) {
$bcc_list = [$bcc_list];
}

$this->arrayHasKey((array)$this->getEmail($message)
->getBcc(), $bcc_list, 'The last email sent was not bcc\'ed to any of the following addresses: ' . implode(', ', $bcc_list) . '.');

return $this;
}
Expand Down

0 comments on commit a80c77a

Please sign in to comment.