@@ -39,7 +39,7 @@ class ClientTest extends TestCase
3939 public function setUp (): void
4040 {
4141 $ this ->vonageClient = $ this ->prophesize (Client::class);
42- $ this ->vonageClient ->getRestUrl ()->willReturn ('https://api-eu.vonage.com/meetings ' );
42+ $ this ->vonageClient ->getRestUrl ()->willReturn ('https://api-eu.vonage.com/v1/ meetings ' );
4343 $ this ->vonageClient ->getCredentials ()->willReturn (
4444 new Client \Credentials \Container (new Client \Credentials \Keypair (
4545 file_get_contents (__DIR__ . '/../Client/Credentials/test.key ' ),
@@ -52,14 +52,14 @@ public function setUp(): void
5252 ->setExceptionErrorHandler (new ExceptionErrorHandler ())
5353 ->setClient ($ this ->vonageClient ->reveal ())
5454 ->setAuthHandler (new KeypairHandler ())
55- ->setBaseUrl ('https://api-eu.vonage.com/meetings ' );
55+ ->setBaseUrl ('https://api-eu.vonage.com/v1/ meetings ' );
5656 $ this ->meetingsClient = new MeetingsClient ($ this ->api );
5757 }
5858
5959 public function testBaseUrlIsSet (): void
6060 {
6161 $ this ->assertEquals (
62- 'https://api-eu.vonage.com/meetings ' ,
62+ 'https://api-eu.vonage.com/v1/ meetings ' ,
6363 $ this ->meetingsClient ->getAPIResource ()->getBaseUrl ()
6464 );
6565 }
@@ -71,7 +71,7 @@ public function testWillGetAvailableRooms(): void
7171
7272 $ uri = $ request ->getUri ();
7373 $ uriString = $ uri ->__toString ();
74- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/rooms?page_size=20 ' , $ uriString );
74+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/rooms?page_size=20 ' , $ uriString );
7575
7676 return true ;
7777 }))->willReturn ($ this ->getResponse ('get-rooms-success ' ));
@@ -91,7 +91,7 @@ public function testWillGetAvailableRoomsWithFilter(): void
9191
9292 $ uri = $ request ->getUri ();
9393 $ uriString = $ uri ->__toString ();
94- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/rooms?start_id=999&end_id=234&page_size=20 ' , $ uriString );
94+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/rooms?start_id=999&end_id=234&page_size=20 ' , $ uriString );
9595
9696 return true ;
9797 }))->willReturn ($ this ->getResponse ('get-rooms-success ' ));
@@ -111,7 +111,7 @@ public function testWillCreateRoom(): void
111111
112112 $ uri = $ request ->getUri ();
113113 $ uriString = $ uri ->__toString ();
114- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/rooms ' , $ uriString );
114+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/rooms ' , $ uriString );
115115
116116 $ this ->assertRequestJsonBodyContains ('display_name ' , 'test-room ' , $ request );
117117 return true ;
@@ -134,7 +134,7 @@ public function testWillCreateLongTermRoom(): void
134134
135135 $ uri = $ request ->getUri ();
136136 $ uriString = $ uri ->__toString ();
137- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/rooms ' , $ uriString );
137+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/rooms ' , $ uriString );
138138
139139 $ this ->assertRequestJsonBodyContains ('display_name ' , 'test-room ' , $ request );
140140 return true ;
@@ -161,7 +161,7 @@ public function testClientWillHandleUnauthorizedRequests(): void
161161
162162 $ uri = $ request ->getUri ();
163163 $ uriString = $ uri ->__toString ();
164- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/rooms ' , $ uriString );
164+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/rooms ' , $ uriString );
165165
166166 $ this ->assertRequestJsonBodyContains ('display_name ' , 'something ' , $ request );
167167 return true ;
@@ -183,7 +183,7 @@ public function testClientWillHandleNotFoundResponse(): void
183183 $ uri = $ request ->getUri ();
184184 $ uriString = $ uri ->__toString ();
185185 $ this ->assertEquals (
186- 'https://api-eu.vonage.com/meetings/rooms/224d6219-dc05-4c09-9d42-96adce7fcb67 ' ,
186+ 'https://api-eu.vonage.com/v1/ meetings/rooms/224d6219-dc05-4c09-9d42-96adce7fcb67 ' ,
187187 $ uriString
188188 );
189189 return true ;
@@ -200,7 +200,7 @@ public function testClientWillHandleValidationError(): void
200200
201201 $ uri = $ request ->getUri ();
202202 $ uriString = $ uri ->__toString ();
203- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/rooms ' , $ uriString );
203+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/rooms ' , $ uriString );
204204
205205 return true ;
206206 }))->willReturn ($ this ->getResponse ('empty ' , 400 ));
@@ -221,7 +221,7 @@ public function testWillGetRoomDetails(): void
221221 $ uri = $ request ->getUri ();
222222 $ uriString = $ uri ->__toString ();
223223 $ this ->assertEquals (
224- 'https://api-eu.vonage.com/meetings/rooms/224d6219-dc05-4c09-9d42-96adce7fcb67 ' ,
224+ 'https://api-eu.vonage.com/v1/ meetings/rooms/224d6219-dc05-4c09-9d42-96adce7fcb67 ' ,
225225 $ uriString
226226 );
227227 return true ;
@@ -242,7 +242,7 @@ public function testWillUpdateExistingRoom(): void
242242 $ uri = $ request ->getUri ();
243243 $ uriString = $ uri ->__toString ();
244244 $ this ->assertEquals (
245- 'https://api-eu.vonage.com/meetings/rooms/e857c5ce-cdee-4971-ab20-208a98263282 ' ,
245+ 'https://api-eu.vonage.com/v1/ meetings/rooms/e857c5ce-cdee-4971-ab20-208a98263282 ' ,
246246 $ uriString
247247 );
248248
@@ -274,7 +274,7 @@ public function testWillGetRecording(): void
274274 $ uri = $ request ->getUri ();
275275 $ uriString = $ uri ->__toString ();
276276 $ this ->assertEquals (
277- 'https://api-eu.vonage.com/meetings/recordings/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885 ' ,
277+ 'https://api-eu.vonage.com/v1/ meetings/recordings/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885 ' ,
278278 $ uriString
279279 );
280280
@@ -294,7 +294,7 @@ public function testWillDeleteRecording(): void
294294 $ uri = $ request ->getUri ();
295295 $ uriString = $ uri ->__toString ();
296296 $ this ->assertEquals (
297- 'https://api-eu.vonage.com/meetings/recordings/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885 ' ,
297+ 'https://api-eu.vonage.com/v1/ meetings/recordings/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885 ' ,
298298 $ uriString
299299 );
300300
@@ -313,7 +313,7 @@ public function testWillGetRecordingsFromSession(): void
313313 $ uri = $ request ->getUri ();
314314 $ uriString = $ uri ->__toString ();
315315 $ this ->assertEquals (
316- 'https://api-eu.vonage.com/meetings/sessions/2_MX40NjMwODczMn5-MTU3NTgyODEwNzQ2MH5OZDJrVmdBRUNDbG5MUzNqNXgya20yQ1Z-fg/recordings ' ,
316+ 'https://api-eu.vonage.com/v1/ meetings/sessions/2_MX40NjMwODczMn5-MTU3NTgyODEwNzQ2MH5OZDJrVmdBRUNDbG5MUzNqNXgya20yQ1Z-fg/recordings ' ,
317317 $ uriString
318318 );
319319
@@ -335,7 +335,7 @@ public function testWillGetMeetingDialNumbers(): void
335335 $ uri = $ request ->getUri ();
336336 $ uriString = $ uri ->__toString ();
337337 $ this ->assertEquals (
338- 'https://api-eu.vonage.com/meetings/dial-in-numbers ' ,
338+ 'https://api-eu.vonage.com/v1/ meetings/dial-in-numbers ' ,
339339 $ uriString
340340 );
341341
@@ -357,7 +357,7 @@ public function testWillGetApplicationThemes(): void
357357 $ uri = $ request ->getUri ();
358358 $ uriString = $ uri ->__toString ();
359359 $ this ->assertEquals (
360- 'https://api-eu.vonage.com/meetings/themes ' ,
360+ 'https://api-eu.vonage.com/v1/ meetings/themes ' ,
361361 $ uriString
362362 );
363363
@@ -378,7 +378,7 @@ public function testWillCreateTheme(): void
378378
379379 $ uri = $ request ->getUri ();
380380 $ uriString = $ uri ->__toString ();
381- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes ' , $ uriString );
381+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes ' , $ uriString );
382382
383383 $ this ->assertRequestJsonBodyContains ('theme_name ' , 'My-Theme ' , $ request );
384384
@@ -398,7 +398,7 @@ public function testWillHandleConflictErrorOnThemeCreation(): void
398398
399399 $ uri = $ request ->getUri ();
400400 $ uriString = $ uri ->__toString ();
401- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes ' , $ uriString );
401+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes ' , $ uriString );
402402
403403 $ this ->assertRequestJsonBodyContains ('theme_name ' , 'My-Theme ' , $ request );
404404
@@ -417,7 +417,7 @@ public function testWillGetThemeById(): void
417417
418418 $ uri = $ request ->getUri ();
419419 $ uriString = $ uri ->__toString ();
420- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/afb5b1f2-fe83-4b14-83ff-f23f5630c160 ' , $ uriString );
420+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/afb5b1f2-fe83-4b14-83ff-f23f5630c160 ' , $ uriString );
421421
422422 return true ;
423423 }))->willReturn ($ this ->getResponse ('get-theme-success ' ));
@@ -434,7 +434,7 @@ public function testWillDeleteTheme(): void
434434
435435 $ uri = $ request ->getUri ();
436436 $ uriString = $ uri ->__toString ();
437- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885 ' , $ uriString );
437+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885 ' , $ uriString );
438438
439439 return true ;
440440 }))->willReturn ($ this ->getResponse ('empty ' , 204 ));
@@ -450,7 +450,7 @@ public function testWillForceDeleteTheme(): void
450450
451451 $ uri = $ request ->getUri ();
452452 $ uriString = $ uri ->__toString ();
453- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885?force=true ' , $ uriString );
453+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/2dbd1cf7-afbb-45d8-9fb6-9e95ce2f8885?force=true ' , $ uriString );
454454
455455 return true ;
456456 }))->willReturn ($ this ->getResponse ('empty ' , 204 ));
@@ -468,7 +468,7 @@ public function testWillUpdateThemeById(): void
468468
469469 $ uri = $ request ->getUri ();
470470 $ uriString = $ uri ->__toString ();
471- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/afb5b1f2-fe83-4b14-83ff-f23f5630c160 ' , $ uriString );
471+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/afb5b1f2-fe83-4b14-83ff-f23f5630c160 ' , $ uriString );
472472
473473 return true ;
474474 }))->willReturn ($ this ->getResponse ('update-theme-success ' ));
@@ -499,7 +499,7 @@ public function testWillExtractCorrectImageKey($logoType, $validCall): void
499499 if ($ request ->getMethod () === 'GET ' ) {
500500 $ uri = $ request ->getUri ();
501501 $ uriString = $ uri ->__toString ();
502- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/logos-upload-urls ' , $ uriString );
502+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/logos-upload-urls ' , $ uriString );
503503
504504 return true ;
505505 }
@@ -521,7 +521,7 @@ public function testWillUploadImageToAws(): void
521521 if ($ request ->getMethod () === 'GET ' ) {
522522 $ uri = $ request ->getUri ();
523523 $ uriString = $ uri ->__toString ();
524- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/logos-upload-urls ' , $ uriString );
524+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/logos-upload-urls ' , $ uriString );
525525
526526 return true ;
527527 }
@@ -531,7 +531,7 @@ public function testWillUploadImageToAws(): void
531531
532532 $ uri = $ request ->getUri ();
533533 $ uriString = $ uri ->__toString ();
534- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/afb5b1f2-fe83-4b14-83ff-f23f5630c160/finalizeLogos ' , $ uriString );
534+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/afb5b1f2-fe83-4b14-83ff-f23f5630c160/finalizeLogos ' , $ uriString );
535535
536536 return true ;
537537 }
@@ -566,7 +566,7 @@ public function testCanGetUploadUrlsForThemeLogo(): void
566566
567567 $ uri = $ request ->getUri ();
568568 $ uriString = $ uri ->__toString ();
569- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/logos-upload-urls ' , $ uriString );
569+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/logos-upload-urls ' , $ uriString );
570570
571571 return true ;
572572 }))->willReturn ($ this ->getResponse ('get-upload-urls-success ' ));
@@ -582,7 +582,7 @@ public function testWillGetRoomsAssociatedWithTheme(): void
582582
583583 $ uri = $ request ->getUri ();
584584 $ uriString = $ uri ->__toString ();
585- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/323867d7-8c4b-4dce-8c11-48f14425d888/rooms?page_size=20 ' , $ uriString );
585+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/323867d7-8c4b-4dce-8c11-48f14425d888/rooms?page_size=20 ' , $ uriString );
586586
587587 return true ;
588588 }))->willReturn ($ this ->getResponse ('get-rooms-by-theme-id-success ' ));
@@ -601,7 +601,7 @@ public function testWillGetRoomsAssociatedWithThemeUsingFilter(): void
601601
602602 $ uri = $ request ->getUri ();
603603 $ uriString = $ uri ->__toString ();
604- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/themes/323867d7-8c4b-4dce-8c11-48f14425d888/rooms?start_id=245&end_id=765&page_size=20 ' , $ uriString );
604+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/themes/323867d7-8c4b-4dce-8c11-48f14425d888/rooms?start_id=245&end_id=765&page_size=20 ' , $ uriString );
605605
606606 return true ;
607607 }))->willReturn ($ this ->getResponse ('get-rooms-by-theme-id-success ' ));
@@ -621,7 +621,7 @@ public function testWillUpdateExistingApplication(): void
621621
622622 $ uri = $ request ->getUri ();
623623 $ uriString = $ uri ->__toString ();
624- $ this ->assertEquals ('https://api-eu.vonage.com/meetings/applications ' , $ uriString );
624+ $ this ->assertEquals ('https://api-eu.vonage.com/v1/ meetings/applications ' , $ uriString );
625625
626626 return true ;
627627 }))->willReturn ($ this ->getResponse ('update-application-success ' ));
0 commit comments