mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-29 16:36:07 +03:00
Add setMessage
This commit is contained in:
parent
fea1279b93
commit
6196f8df49
@ -338,6 +338,11 @@ class MessageBuilder
|
||||
}
|
||||
}
|
||||
|
||||
public function setMessage($message)
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->message;
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user