@@ -188,6 +188,37 @@ public function testCreateJoinMeetingUrl()
188188 }
189189 }
190190
191+ public function testJoinMeeting ()
192+ {
193+ $ joinMeetingParams = $ this ->generateJoinMeetingParams ();
194+ $ params = $ this ->getJoinMeetingMock ($ joinMeetingParams );
195+ $ xml = "<response>
196+ <returncode>SUCCESS</returncode>
197+ <messageKey>successfullyJoined</messageKey>
198+ <message>You have joined successfully.</message>
199+ <meeting_id> {$ params ->getMeetingID ()}</meeting_id>
200+ <user_id> {$ params ->getUserID ()}</user_id>
201+ <auth_token>14mm5y3eurjw</auth_token>
202+ <session_token>ai1wqj8wb6s7rnk0</session_token>
203+ <url>https://yourserver.com/client/BigBlueButton.html?sessionToken=ai1wqj8wb6s7rnk0</url>
204+ </response> " ;
205+
206+ $ this ->transport ->method ('request ' )->willReturn (new TransportResponse ($ xml , null ));
207+
208+ $ response = $ this ->bbb ->joinMeeting ($ params );
209+
210+ $ this ->assertEquals ($ params ->getMeetingID (), $ response ->getMeetingId ());
211+ $ this ->assertEquals ($ params ->getUserID (), $ response ->getUserId ());
212+ $ this ->assertEquals ('14mm5y3eurjw ' , $ response ->getAuthToken ());
213+ $ this ->assertEquals ('ai1wqj8wb6s7rnk0 ' , $ response ->getSessionToken ());
214+ $ this ->assertEquals ('' , $ response ->getGuestStatus ());
215+ $ this ->assertEquals ('https://yourserver.com/client/BigBlueButton.html?sessionToken=ai1wqj8wb6s7rnk0 ' , $ response ->getUrl ());
216+ $ this ->assertTrue ($ response ->isSuccessfullyJoined ());
217+ $ this ->assertFalse ($ response ->isSessionInvalid ());
218+ $ this ->assertFalse ($ response ->isServerError ());
219+ $ this ->assertFalse ($ response ->isGuestDeny ());
220+ }
221+
191222 /* End Meeting */
192223
193224 /**
@@ -205,6 +236,24 @@ public function testCreateEndMeetingUrl()
205236 }
206237 }
207238
239+ public function testEndMeeting ()
240+ {
241+ $ data = $ this ->generateEndMeetingParams ();
242+ $ params = $ this ->getEndMeetingMock ($ data );
243+ $ xml = '<response>
244+ <returncode>SUCCESS</returncode>
245+ <messageKey>sentEndMeetingRequest</messageKey>
246+ <message>foobar</message>
247+ </response> ' ;
248+
249+ $ this ->transport ->method ('request ' )->willReturn (new TransportResponse ($ xml , null ));
250+
251+ $ response = $ this ->bbb ->endMeeting ($ params );
252+
253+ $ this ->assertEquals ('foobar ' , $ response ->getMessage ());
254+ $ this ->assertTrue ($ response ->isEndMeetingRequestSent ());
255+ }
256+
208257 /* Get Meetings */
209258
210259 public function testGetMeetingsUrl ()
0 commit comments