@@ -119,10 +119,12 @@ public function testCreateMeetingUrl(): void
119119 */
120120 public function testCreateMeeting ()
121121 {
122- $ params = $ this ->generateCreateParams ();
123- $ result = $ this ->bbb ->createMeeting ($ this ->getCreateMock ($ params ));
122+ $ result = $ this ->createRealMeeting ($ this ->bbb );
124123 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode ());
125124 $ this ->assertTrue ($ result ->success ());
125+
126+ // Cleanup
127+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ result ->getMeetingId (), $ result ->getModeratorPassword ()));
126128 }
127129
128130 /**
@@ -138,6 +140,9 @@ public function testCreateMeetingWithDocumentUrl()
138140 $ this ->assertCount (1 , $ params ->getPresentations ());
139141 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode ());
140142 $ this ->assertTrue ($ result ->success ());
143+
144+ // Cleanup
145+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ result ->getMeetingId (), $ result ->getModeratorPassword ()));
141146 }
142147
143148 /**
@@ -153,6 +158,9 @@ public function testCreateMeetingWithDocumentUrlAndFileName()
153158 $ this ->assertCount (1 , $ params ->getPresentations ());
154159 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode ());
155160 $ this ->assertTrue ($ result ->success ());
161+
162+ // Cleanup
163+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ result ->getMeetingId (), $ result ->getModeratorPassword ()));
156164 }
157165
158166 /**
@@ -168,6 +176,9 @@ public function testCreateMeetingWithDocumentEmbedded()
168176 $ this ->assertCount (1 , $ params ->getPresentations ());
169177 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode ());
170178 $ this ->assertTrue ($ result ->success ());
179+
180+ // Cleanup
181+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ result ->getMeetingId (), $ result ->getModeratorPassword ()));
171182 }
172183
173184 /**
@@ -184,6 +195,9 @@ public function testCreateMeetingWithMultiDocument()
184195 $ this ->assertCount (2 , $ params ->getPresentations ());
185196 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode ());
186197 $ this ->assertTrue ($ result ->success ());
198+
199+ // Cleanup
200+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ result ->getMeetingId (), $ result ->getModeratorPassword ()));
187201 }
188202
189203 /* Join Meeting */
@@ -208,8 +222,9 @@ public function testCreateJoinMeetingUrl(): void
208222
209223 public function testJoinMeeting ()
210224 {
211- $ params = $ this ->generateCreateParams ();
212- $ result = $ this ->bbb ->createMeeting ($ this ->getCreateMock ($ params ));
225+ $ params = $ this ->getCreateMock ($ this ->generateCreateParams ());
226+ $ params ->setGuestPolicy ('ALWAYS_ACCEPT ' );
227+ $ result = $ this ->bbb ->createMeeting ($ params );
213228 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode (), 'Create meeting ' );
214229 $ creationTime = $ result ->getCreationTime ();
215230
@@ -226,6 +241,9 @@ public function testJoinMeeting()
226241 $ this ->assertNotEmpty ($ joinMeeting ->getSessionToken ());
227242 $ this ->assertNotEmpty ($ joinMeeting ->getGuestStatus ());
228243 $ this ->assertNotEmpty ($ joinMeeting ->getUrl ());
244+
245+ // Cleanup
246+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ result ->getMeetingId (), $ result ->getModeratorPassword ()));
229247 }
230248
231249 /* End Meeting */
@@ -283,8 +301,13 @@ public function testGetMeetingsUrl(): void
283301
284302 public function testGetMeetings ()
285303 {
304+ $ meeting = $ this ->createRealMeeting ($ this ->bbb );
305+
286306 $ result = $ this ->bbb ->getMeetings ();
287307 $ this ->assertNotEmpty ($ result ->getMeetings ());
308+
309+ // Cleanup
310+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ meeting ->getMeetingId (), $ meeting ->getModeratorPassword ()));
288311 }
289312
290313 /* Get meeting info */
@@ -295,6 +318,9 @@ public function testGetMeetingInfoUrl(): void
295318
296319 $ url = $ this ->bbb ->getMeetingInfoUrl (new GetMeetingInfoParameters ($ meeting ->getMeetingId ()));
297320 $ this ->assertStringContainsString ('= ' .rawurlencode ($ meeting ->getMeetingId ()), $ url );
321+
322+ // Cleanup
323+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ meeting ->getMeetingId (), $ meeting ->getModeratorPassword ()));
298324 }
299325
300326 public function testGetMeetingInfo ()
@@ -304,6 +330,9 @@ public function testGetMeetingInfo()
304330 $ result = $ this ->bbb ->getMeetingInfo (new GetMeetingInfoParameters ($ meeting ->getMeetingId (), $ meeting ->getModeratorPassword ()));
305331 $ this ->assertEquals ('SUCCESS ' , $ result ->getReturnCode ());
306332 $ this ->assertTrue ($ result ->success ());
333+
334+ // Cleanup
335+ $ this ->bbb ->endMeeting (new EndMeetingParameters ($ meeting ->getMeetingId (), $ meeting ->getModeratorPassword ()));
307336 }
308337
309338 public function testGetRecordingsUrl (): void
0 commit comments