This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from stefliekens/reply-to
Added Reply-To address
- Loading branch information
Showing
9 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ public function it_should_send_a_mail_with_mandrill_template($transport) | |
&& $message->getCc()->has('[email protected]') | ||
&& $message->getBcc()->has('[email protected]') | ||
&& $message->getFrom()->has('[email protected]') | ||
&& $message->getReplyTo()->has('[email protected]') | ||
&& $message->getSubject() == $mail->getSubject() | ||
&& $message->getOptions() == ['subaccount' => 'test'] | ||
&& $message->getGlobalMetadata() == ['meta1' => 'meta1'] | ||
|
@@ -67,6 +68,7 @@ public function it_should_send_a_mail_with_zend_view_renderer($transport, $messa | |
&& $message->getCc()->has('[email protected]') | ||
&& $message->getBcc()->has('[email protected]') | ||
&& $message->getFrom()->has('[email protected]') | ||
&& $message->getReplyTo()->has('[email protected]') | ||
&& $message->getSubject() == $mail->getSubject() | ||
&& $message->getOptions() == ['subaccount' => 'test'] | ||
&& $message->getImages() == [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ public function it_should_send_a_mail($transport, $messageCreator, $mailMessage) | |
&& $message->getCc()->has('[email protected]') | ||
&& $message->getBcc()->has('[email protected]') | ||
&& $message->getFrom()->has('[email protected]') | ||
&& $message->getReplyTo()->has('[email protected]') | ||
&& $message->getSubject() == $mail->getSubject(); | ||
}))->shouldBeCalled(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,17 @@ public function it_should_provide_a_from_addresses() | |
$result->shouldHaveCount(1); | ||
} | ||
|
||
public function it_should_provide_a_reply_to_address() | ||
{ | ||
$this->setReplyTo('[email protected]', 'name'); | ||
$this->getReplyTo()['[email protected]']->shouldBe('name'); | ||
|
||
$this->setReplyTo('[email protected]'); | ||
$result = $this->getReplyTo(); | ||
$result[0]->shouldBe('[email protected]'); | ||
$result->shouldHaveCount(1); | ||
} | ||
|
||
public function it_should_provide_a_subject() | ||
{ | ||
$value = 'subject'; | ||
|
@@ -76,12 +87,12 @@ public function it_should_provide_attachments() | |
} | ||
|
||
/** | ||
* @param Zend\Mail\Header\HeaderInterface $header | ||
* @param \Zend\Mail\Header\HeaderInterface $header | ||
*/ | ||
public function it_should_provide_headers($header) | ||
{ | ||
$header->getFieldName()->willReturn('Reply-To'); | ||
$header->getFieldValue()->willReturn('[email protected]'); | ||
$header->getFieldValue(false)->willReturn('[email protected]'); | ||
|
||
$this->addHeader($header); | ||
$this->addHeaders(['Content-Type' => 'text/html']); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ protected function createEmptyMailStub() | |
$mail->getCc()->willReturn(['[email protected]' => 'me']); | ||
$mail->getBcc()->willReturn(['[email protected]' => 'me']); | ||
$mail->getFrom()->willReturn(['[email protected]' => 'me']); | ||
$mail->getReplyTo()->willReturn(['[email protected]' => 'me']); | ||
$mail->getSubject()->willReturn('Subject'); | ||
|
||
$mail->getHeaders()->willReturn($headers); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ protected function getMailStub() | |
$mail->getCc()->willReturn(['[email protected]' => 'me']); | ||
$mail->getBcc()->willReturn(['[email protected]' => 'me']); | ||
$mail->getFrom()->willReturn(['[email protected]' => 'me']); | ||
$mail->getReplyTo()->willReturn(['[email protected]' => 'me']); | ||
$mail->getSubject()->willReturn('Subject'); | ||
|
||
$mail->getParams()->willReturn(['param1' => 'value1']); | ||
|