forked from mailjet/MailjetSwiftMailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mailjet#26 Does not initializes the name property if not provided
- Loading branch information
Guillaume Gautreau
committed
Feb 25, 2019
1 parent
bd1c115
commit d4db161
Showing
2 changed files
with
39 additions
and
4 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
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 |
---|---|---|
|
@@ -255,6 +255,32 @@ public function testBulkSendMessages() { | |
} | ||
} | ||
|
||
public function testReplyToWithoutName(){ | ||
$message = new \Swift_Message('Test Subject', '<p>Foo bar</p>', 'text/html'); | ||
$message->setReplyTo('[email protected]'); | ||
$message->setFrom('[email protected]'); | ||
$message->setTo('[email protected]'); | ||
$message->setBody("Hello world!", 'text/plain'); | ||
|
||
$transport = $this->createTransport(); | ||
$mailjetMessage = $transport->messageFormat->getMailjetMessage($message)['Messages'][0]; | ||
|
||
$this->assertEquals(["Email" => '[email protected]'], $mailjetMessage['ReplyTo']); | ||
} | ||
|
||
public function testReplyTo(){ | ||
$message = new \Swift_Message('Test Subject', '<p>Foo bar</p>', 'text/html'); | ||
$message->setReplyTo('[email protected]', 'Alice'); | ||
$message->setFrom('[email protected]'); | ||
$message->setTo('[email protected]'); | ||
$message->setBody("Hello world!", 'text/plain'); | ||
|
||
$transport = $this->createTransport(); | ||
$mailjetMessage = $transport->messageFormat->getMailjetMessage($message)['Messages'][0]; | ||
|
||
$this->assertEquals(["Email" => '[email protected]', "Name" => "Alice"], $mailjetMessage['ReplyTo']); | ||
} | ||
|
||
/** | ||
* @param string $email | ||
* @param string $name | ||
|