@@ -39,7 +39,7 @@ class ClientTest extends TestCase
39
39
public function setUp (): void
40
40
{
41
41
$ 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 ' );
43
43
$ this ->vonageClient ->getCredentials ()->willReturn (
44
44
new Client \Credentials \Container (new Client \Credentials \Keypair (
45
45
file_get_contents (__DIR__ . '/../Client/Credentials/test.key ' ),
@@ -52,14 +52,14 @@ public function setUp(): void
52
52
->setExceptionErrorHandler (new ExceptionErrorHandler ())
53
53
->setClient ($ this ->vonageClient ->reveal ())
54
54
->setAuthHandler (new KeypairHandler ())
55
- ->setBaseUrl ('https://api-eu.vonage.com/meetings ' );
55
+ ->setBaseUrl ('https://api-eu.vonage.com/v1/ meetings ' );
56
56
$ this ->meetingsClient = new MeetingsClient ($ this ->api );
57
57
}
58
58
59
59
public function testBaseUrlIsSet (): void
60
60
{
61
61
$ this ->assertEquals (
62
- 'https://api-eu.vonage.com/meetings ' ,
62
+ 'https://api-eu.vonage.com/v1/ meetings ' ,
63
63
$ this ->meetingsClient ->getAPIResource ()->getBaseUrl ()
64
64
);
65
65
}
@@ -71,7 +71,7 @@ public function testWillGetAvailableRooms(): void
71
71
72
72
$ uri = $ request ->getUri ();
73
73
$ 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 );
75
75
76
76
return true ;
77
77
}))->willReturn ($ this ->getResponse ('get-rooms-success ' ));
@@ -91,7 +91,7 @@ public function testWillGetAvailableRoomsWithFilter(): void
91
91
92
92
$ uri = $ request ->getUri ();
93
93
$ 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 );
95
95
96
96
return true ;
97
97
}))->willReturn ($ this ->getResponse ('get-rooms-success ' ));
@@ -111,7 +111,7 @@ public function testWillCreateRoom(): void
111
111
112
112
$ uri = $ request ->getUri ();
113
113
$ 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 );
115
115
116
116
$ this ->assertRequestJsonBodyContains ('display_name ' , 'test-room ' , $ request );
117
117
return true ;
@@ -134,7 +134,7 @@ public function testWillCreateLongTermRoom(): void
134
134
135
135
$ uri = $ request ->getUri ();
136
136
$ 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 );
138
138
139
139
$ this ->assertRequestJsonBodyContains ('display_name ' , 'test-room ' , $ request );
140
140
return true ;
@@ -161,7 +161,7 @@ public function testClientWillHandleUnauthorizedRequests(): void
161
161
162
162
$ uri = $ request ->getUri ();
163
163
$ 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 );
165
165
166
166
$ this ->assertRequestJsonBodyContains ('display_name ' , 'something ' , $ request );
167
167
return true ;
@@ -183,7 +183,7 @@ public function testClientWillHandleNotFoundResponse(): void
183
183
$ uri = $ request ->getUri ();
184
184
$ uriString = $ uri ->__toString ();
185
185
$ 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 ' ,
187
187
$ uriString
188
188
);
189
189
return true ;
@@ -200,7 +200,7 @@ public function testClientWillHandleValidationError(): void
200
200
201
201
$ uri = $ request ->getUri ();
202
202
$ 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 );
204
204
205
205
return true ;
206
206
}))->willReturn ($ this ->getResponse ('empty ' , 400 ));
@@ -221,7 +221,7 @@ public function testWillGetRoomDetails(): void
221
221
$ uri = $ request ->getUri ();
222
222
$ uriString = $ uri ->__toString ();
223
223
$ 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 ' ,
225
225
$ uriString
226
226
);
227
227
return true ;
@@ -242,7 +242,7 @@ public function testWillUpdateExistingRoom(): void
242
242
$ uri = $ request ->getUri ();
243
243
$ uriString = $ uri ->__toString ();
244
244
$ 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 ' ,
246
246
$ uriString
247
247
);
248
248
@@ -274,7 +274,7 @@ public function testWillGetRecording(): void
274
274
$ uri = $ request ->getUri ();
275
275
$ uriString = $ uri ->__toString ();
276
276
$ 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 ' ,
278
278
$ uriString
279
279
);
280
280
@@ -294,7 +294,7 @@ public function testWillDeleteRecording(): void
294
294
$ uri = $ request ->getUri ();
295
295
$ uriString = $ uri ->__toString ();
296
296
$ 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 ' ,
298
298
$ uriString
299
299
);
300
300
@@ -313,7 +313,7 @@ public function testWillGetRecordingsFromSession(): void
313
313
$ uri = $ request ->getUri ();
314
314
$ uriString = $ uri ->__toString ();
315
315
$ 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 ' ,
317
317
$ uriString
318
318
);
319
319
@@ -335,7 +335,7 @@ public function testWillGetMeetingDialNumbers(): void
335
335
$ uri = $ request ->getUri ();
336
336
$ uriString = $ uri ->__toString ();
337
337
$ this ->assertEquals (
338
- 'https://api-eu.vonage.com/meetings/dial-in-numbers ' ,
338
+ 'https://api-eu.vonage.com/v1/ meetings/dial-in-numbers ' ,
339
339
$ uriString
340
340
);
341
341
@@ -357,7 +357,7 @@ public function testWillGetApplicationThemes(): void
357
357
$ uri = $ request ->getUri ();
358
358
$ uriString = $ uri ->__toString ();
359
359
$ this ->assertEquals (
360
- 'https://api-eu.vonage.com/meetings/themes ' ,
360
+ 'https://api-eu.vonage.com/v1/ meetings/themes ' ,
361
361
$ uriString
362
362
);
363
363
@@ -378,7 +378,7 @@ public function testWillCreateTheme(): void
378
378
379
379
$ uri = $ request ->getUri ();
380
380
$ 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 );
382
382
383
383
$ this ->assertRequestJsonBodyContains ('theme_name ' , 'My-Theme ' , $ request );
384
384
@@ -398,7 +398,7 @@ public function testWillHandleConflictErrorOnThemeCreation(): void
398
398
399
399
$ uri = $ request ->getUri ();
400
400
$ 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 );
402
402
403
403
$ this ->assertRequestJsonBodyContains ('theme_name ' , 'My-Theme ' , $ request );
404
404
@@ -417,7 +417,7 @@ public function testWillGetThemeById(): void
417
417
418
418
$ uri = $ request ->getUri ();
419
419
$ 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 );
421
421
422
422
return true ;
423
423
}))->willReturn ($ this ->getResponse ('get-theme-success ' ));
@@ -434,7 +434,7 @@ public function testWillDeleteTheme(): void
434
434
435
435
$ uri = $ request ->getUri ();
436
436
$ 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 );
438
438
439
439
return true ;
440
440
}))->willReturn ($ this ->getResponse ('empty ' , 204 ));
@@ -450,7 +450,7 @@ public function testWillForceDeleteTheme(): void
450
450
451
451
$ uri = $ request ->getUri ();
452
452
$ 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 );
454
454
455
455
return true ;
456
456
}))->willReturn ($ this ->getResponse ('empty ' , 204 ));
@@ -468,7 +468,7 @@ public function testWillUpdateThemeById(): void
468
468
469
469
$ uri = $ request ->getUri ();
470
470
$ 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 );
472
472
473
473
return true ;
474
474
}))->willReturn ($ this ->getResponse ('update-theme-success ' ));
@@ -499,7 +499,7 @@ public function testWillExtractCorrectImageKey($logoType, $validCall): void
499
499
if ($ request ->getMethod () === 'GET ' ) {
500
500
$ uri = $ request ->getUri ();
501
501
$ 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 );
503
503
504
504
return true ;
505
505
}
@@ -521,7 +521,7 @@ public function testWillUploadImageToAws(): void
521
521
if ($ request ->getMethod () === 'GET ' ) {
522
522
$ uri = $ request ->getUri ();
523
523
$ 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 );
525
525
526
526
return true ;
527
527
}
@@ -531,7 +531,7 @@ public function testWillUploadImageToAws(): void
531
531
532
532
$ uri = $ request ->getUri ();
533
533
$ 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 );
535
535
536
536
return true ;
537
537
}
@@ -566,7 +566,7 @@ public function testCanGetUploadUrlsForThemeLogo(): void
566
566
567
567
$ uri = $ request ->getUri ();
568
568
$ 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 );
570
570
571
571
return true ;
572
572
}))->willReturn ($ this ->getResponse ('get-upload-urls-success ' ));
@@ -582,7 +582,7 @@ public function testWillGetRoomsAssociatedWithTheme(): void
582
582
583
583
$ uri = $ request ->getUri ();
584
584
$ 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 );
586
586
587
587
return true ;
588
588
}))->willReturn ($ this ->getResponse ('get-rooms-by-theme-id-success ' ));
@@ -601,7 +601,7 @@ public function testWillGetRoomsAssociatedWithThemeUsingFilter(): void
601
601
602
602
$ uri = $ request ->getUri ();
603
603
$ 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 );
605
605
606
606
return true ;
607
607
}))->willReturn ($ this ->getResponse ('get-rooms-by-theme-id-success ' ));
@@ -621,7 +621,7 @@ public function testWillUpdateExistingApplication(): void
621
621
622
622
$ uri = $ request ->getUri ();
623
623
$ 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 );
625
625
626
626
return true ;
627
627
}))->willReturn ($ this ->getResponse ('update-application-success ' ));
0 commit comments