Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ public static function fromString($rawMessage)
$message = new static();
$headers = null;
$content = null;
Mime\Decode::splitMessage($rawMessage, $headers, $content);
Mime\Decode::splitMessage($rawMessage, $headers, $content, Headers::EOL);
if ($headers->has('mime-version')) {
// todo - restore body to mime\message
}
Expand Down
2 changes: 1 addition & 1 deletion test/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ public function testRestoreFromSerializedString()
$this->message->addFrom('matthew@example.com', "Matthew Weier O'Phinney");
$this->message->addCc('zf-contributors@example.com', 'ZF Contributors List');
$this->message->setSubject('This is a subject');
$this->message->setBody('foo');
$this->message->setBody("foo\n\ntest");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing existing tests can lead to cases where we change existing behavior. As such, I'm going to separate this into its own test when I merge, to verify (a) the old behavior, and (b) the fix this patch presents.

$serialized = $this->message->toString();
$restoredMessage = Message::fromString($serialized);
$this->assertEquals($serialized, $restoredMessage->toString());
Expand Down