diff --git a/test/MessageTest.php b/test/MessageTest.php index 8261a082..cd66c5dd 100644 --- a/test/MessageTest.php +++ b/test/MessageTest.php @@ -683,4 +683,16 @@ public function testRestoreFromSerializedString() $restoredMessage = Message::fromString($serialized); $this->assertEquals($serialized, $restoredMessage->toString()); } + + /** + * @group ZF2-5962 + */ + public function testPassEmptyArrayIntoSetPartsOfMimeMessageShouldReturnEmptyBodyString() + { + $mimeMessage = new MimeMessage(); + $mimeMessage->setParts(array()); + + $this->message->setBody($mimeMessage); + $this->assertEquals('', $this->message->getBodyText()); + } }