コード例 #1
0
ファイル: MessageTest.php プロジェクト: olafthelofty/carenta
 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
ファイル: SlackRequest.php プロジェクト: olafthelofty/carenta
 function __construct($url, Message $message)
 {
     $this->url = $url;
     $this->setBody($message->serialize());
 }