Skip to content

Commit 1c6395b

Browse files
committed
Created new test for zendframework#45
- and restored behavior of previous test.
1 parent a3642fa commit 1c6395b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/MessageTest.php

+15
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,21 @@ public function testDefaultDateHeaderEncodingIsAlwaysAscii()
684684
}
685685

686686
public function testRestoreFromSerializedString()
687+
{
688+
$this->message->addTo('[email protected]', 'ZF DevTeam');
689+
$this->message->addFrom('[email protected]', "Matthew Weier O'Phinney");
690+
$this->message->addCc('[email protected]', 'ZF Contributors List');
691+
$this->message->setSubject('This is a subject');
692+
$this->message->setBody('foo');
693+
$serialized = $this->message->toString();
694+
$restoredMessage = Message::fromString($serialized);
695+
$this->assertEquals($serialized, $restoredMessage->toString());
696+
}
697+
698+
/**
699+
* @group 45
700+
*/
701+
public function testCanRestoreFromSerializedStringWhenBodyContainsMultipleNewlines()
687702
{
688703
$this->message->addTo('[email protected]', 'ZF DevTeam');
689704
$this->message->addFrom('[email protected]', "Matthew Weier O'Phinney");

0 commit comments

Comments
 (0)