@@ -262,6 +262,60 @@ public function testGetMeetingsUrl()
262262 $ this ->assertStringContainsString (ApiMethod::GET_MEETINGS , $ url );
263263 }
264264
265+ public function testGetMeetings ()
266+ {
267+ $ xml = '<response>
268+ <returncode>SUCCESS</returncode>
269+ <meetings>
270+ <meeting>
271+ <meetingName>Demo Meeting</meetingName>
272+ <meetingID>Demo Meeting ID</meetingID>
273+ <internalMeetingID>12345</internalMeetingID>
274+ <createTime>1531241258036</createTime>
275+ <createDate>Tue Jul 10 16:47:38 UTC 2018</createDate>
276+ <voiceBridge>70066</voiceBridge>
277+ <dialNumber>613-555-1234</dialNumber>
278+ <attendeePW>ap</attendeePW>
279+ <moderatorPW>mp</moderatorPW>
280+ <running>false</running>
281+ <duration>0</duration>
282+ <hasUserJoined>false</hasUserJoined>
283+ <recording>false</recording>
284+ <hasBeenForciblyEnded>false</hasBeenForciblyEnded>
285+ <startTime>1531241258074</startTime>
286+ <endTime>0</endTime>
287+ <participantCount>0</participantCount>
288+ <listenerCount>0</listenerCount>
289+ <voiceParticipantCount>0</voiceParticipantCount>
290+ <videoCount>0</videoCount>
291+ <maxUsers>0</maxUsers>
292+ <moderatorCount>0</moderatorCount>
293+ <attendees />
294+ <metadata />
295+ <isBreakout>false</isBreakout>
296+ </meeting>
297+ </meetings>
298+ </response> ' ;
299+
300+ $ this ->transport ->method ('request ' )->willReturn (new TransportResponse ($ xml , null ));
301+
302+ $ response = $ this ->bbb ->getMeetings ();
303+
304+ $ this ->assertCount (1 , $ response ->getMeetings ());
305+ $ this ->assertEquals ('Demo Meeting ' , $ response ->getMeetings ()[0 ]->getMeetingName ());
306+ $ this ->assertEquals ('Demo Meeting ID ' , $ response ->getMeetings ()[0 ]->getMeetingId ());
307+ $ this ->assertEquals ('12345 ' , $ response ->getMeetings ()[0 ]->getInternalMeetingId ());
308+ $ this ->assertEquals (1531241258036 , $ response ->getMeetings ()[0 ]->getCreationTime ());
309+ $ this ->assertEquals ('Tue Jul 10 16:47:38 UTC 2018 ' , $ response ->getMeetings ()[0 ]->getCreationDate ());
310+ $ this ->assertEquals ('70066 ' , $ response ->getMeetings ()[0 ]->getVoiceBridge ());
311+ $ this ->assertEquals ('613-555-1234 ' , $ response ->getMeetings ()[0 ]->getDialNumber ());
312+ $ this ->assertEquals ('ap ' , $ response ->getMeetings ()[0 ]->getAttendeePassword ());
313+ $ this ->assertEquals ('mp ' , $ response ->getMeetings ()[0 ]->getModeratorPassword ());
314+ $ this ->assertEquals (false , $ response ->getMeetings ()[0 ]->isRunning ());
315+ $ this ->assertEquals (0 , $ response ->getMeetings ()[0 ]->getDuration ());
316+ $ this ->assertEquals (false , $ response ->getMeetings ()[0 ]->hasUserJoined ());
317+ }
318+
265319 /* Get meeting info */
266320
267321 public function testGetRecordingsUrl ()
0 commit comments