Add setMessage

This commit is contained in:
Iain Cambridge 2014-05-14 14:03:12 +01:00
parent fea1279b93
commit 6196f8df49
2 changed files with 13 additions and 0 deletions

View File

@ -338,6 +338,11 @@ class MessageBuilder
}
}
public function setMessage($message)
{
$this->message = $message;
}
public function getMessage()
{
return $this->message;

View File

@ -254,6 +254,14 @@ class MessageBuilderTest extends \Mailgun\Tests\MailgunTestCase{
$messageObj = $message->getMessage();
$this->assertEquals(array("my-option" => array("yes"), "o:my-other-option" => array("no")), $messageObj);
}
public function testSetMessage(){
$message = [1,2,3,4,5];
$messageBuilder = $this->client->MessageBuilder();
$messageBuilder->setMessage($message);
$this->assertEquals($message, $messageBuilder->getMessage());
}
}
?>