예제 #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());
 }
예제 #2
0
 function __construct($url, Message $message)
 {
     $this->url = $url;
     $this->setBody($message->serialize());
 }