@@ -110,7 +110,7 @@ public function testSendWithOptions()
110
110
111
111
$ response ->expects ($ this ->once ())
112
112
->method ('getContent ' )
113
- ->willReturn (json_encode (['ok ' => true ]));
113
+ ->willReturn (json_encode (['ok ' => true , ' ts ' => ' 1503435956.000247 ' ]));
114
114
115
115
$ expectedBody = json_encode (['channel ' => $ channel , 'text ' => $ message ]);
116
116
@@ -122,7 +122,9 @@ public function testSendWithOptions()
122
122
123
123
$ transport = $ this ->createTransport ($ client , $ channel );
124
124
125
- $ transport ->send (new ChatMessage ('testMessage ' ));
125
+ $ sentMessage = $ transport ->send (new ChatMessage ('testMessage ' ));
126
+
127
+ $ this ->assertSame ('1503435956.000247 ' , $ sentMessage ->getMessageId ());
126
128
}
127
129
128
130
public function testSendWithNotification ()
@@ -138,7 +140,7 @@ public function testSendWithNotification()
138
140
139
141
$ response ->expects ($ this ->once ())
140
142
->method ('getContent ' )
141
- ->willReturn (json_encode (['ok ' => true ]));
143
+ ->willReturn (json_encode (['ok ' => true , ' ts ' => ' 1503435956.000247 ' ]));
142
144
143
145
$ notification = new Notification ($ message );
144
146
$ chatMessage = ChatMessage::fromNotification ($ notification );
@@ -158,7 +160,9 @@ public function testSendWithNotification()
158
160
159
161
$ transport = $ this ->createTransport ($ client , $ channel );
160
162
161
- $ transport ->send ($ chatMessage );
163
+ $ sentMessage = $ transport ->send ($ chatMessage );
164
+
165
+ $ this ->assertSame ('1503435956.000247 ' , $ sentMessage ->getMessageId ());
162
166
}
163
167
164
168
public function testSendWithInvalidOptions ()
0 commit comments