Exemplo n.º 1
0
 public function testSerializeWithAttachment()
 {
     $text = "hello worlds";
     $message = new Message($text);
     $message->attach(new Attachment('plain text fallback'));
     $this->assertEquals(array("text" => $text, "attachments" => array(array("fallback" => "plain text fallback"))), $message->serialize());
 }
Exemplo n.º 2
0
 function __construct($url, Message $message)
 {
     $this->url = $url;
     $this->setBody($message->serialize());
 }