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

Commit 7bddb21

Browse files
committed
Assertion for Reply To check. Fixes #8
1 parent 59a3093 commit 7bddb21

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/MailTracking.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,22 @@ protected function seeEmailFrom($sender, Swift_Message $message = null)
168168
return $this;
169169
}
170170

171+
/**
172+
* Assert that the last email was set to reply to the given address.
173+
*
174+
* @param string $reply_to
175+
* @param Swift_Message $message
176+
*
177+
* @return PHPUnit_Framework_TestCase $this
178+
*/
179+
protected function seeEmailReplyTo($reply_to, Swift_Message $message = null)
180+
{
181+
$this->assertArrayHasKey($reply_to, (array)$this->getEmail($message)
182+
->getReplyTo(), "No email was set to reply to $reply_to.");
183+
184+
return $this;
185+
}
186+
171187
/**
172188
* Assert that the given number of emails were sent.
173189
*

0 commit comments

Comments
 (0)