This repository has been archived by the owner on Nov 30, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
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 #22 from ruudk/patch-2
Properly escape quotes in setFrom, addTo etc.
- Loading branch information
Showing
2 changed files
with
27 additions
and
12 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 |
---|---|---|
|
@@ -37,7 +37,7 @@ public function testSendMessage() | |
$message->addAttachment(new File(__FILE__), 'attachment.php', 'text/plain'); // Attachment with custom filename and mimetype | ||
$response = json_decode($message->send(), true); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response['To']); | ||
$this->assertEquals(0, $response['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response['Message']); | ||
} | ||
|
@@ -57,7 +57,7 @@ public function testSendMultipleMessages() | |
$message->addAttachment(new File(__FILE__), 'attachment.php'); // Attachment with custom filename | ||
$response = json_decode($message->send(), true); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response['To']); | ||
$this->assertEquals(0, $response['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response['Message']); | ||
|
||
|
@@ -68,7 +68,7 @@ public function testSendMultipleMessages() | |
$message->addAttachment(new File(__FILE__), 'attachment.php'); // Attachment without custom filename or mimetype | ||
$response = json_decode($message->send(), true); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response['To']); | ||
$this->assertEquals(0, $response['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response['Message']); | ||
|
||
|
@@ -78,7 +78,7 @@ public function testSendMultipleMessages() | |
$message->setHTMLMessage('<b>second email body</b>'); | ||
$response = json_decode($message->send(), true); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response['To']); | ||
$this->assertEquals(0, $response['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response['Message']); | ||
} | ||
|
@@ -115,15 +115,15 @@ public function testSendMultipleMessagesViaBatch() | |
$this->assertEquals(1, count($responses)); | ||
$response = json_decode($responses[0], true); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response[0]['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response[0]['To']); | ||
$this->assertEquals(0, $response[0]['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response[0]['Message']); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response[1]['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response[1]['To']); | ||
$this->assertEquals(0, $response[1]['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response[1]['Message']); | ||
|
||
$this->assertEquals('Test Test <[email protected]>', $response[2]['To']); | ||
$this->assertEquals('"Test Test" <[email protected]>', $response[2]['To']); | ||
$this->assertEquals(0, $response[2]['ErrorCode']); | ||
$this->assertEquals('Test job accepted', $response[2]['Message']); | ||
} | ||
|