Skip to content

Commit ad2fc71

Browse files
authored
Merge branch 'main' into feature/241-list-broadcasts
2 parents b589418 + 1cdbe85 commit ad2fc71

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

src/OpenTok/Util/Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
// TODO: build this dynamically
4040
/** @internal */
41-
define('OPENTOK_SDK_VERSION', '4.9.0');
41+
define('OPENTOK_SDK_VERSION', '4.9.1');
4242
/** @internal */
4343
define('OPENTOK_SDK_USER_AGENT', 'OpenTok-PHP-SDK/' . OPENTOK_SDK_VERSION);
4444

@@ -560,10 +560,10 @@ public function dial($sessionId, $token, $sipUri, $options)
560560

561561
public function playDTMF(string $sessionId, string $digits, string $connectionId = null): void
562562
{
563-
$route = sprintf('/v2/projects/%s/session/%s/play-dtmf', $this->apiKey, $sessionId);
563+
$route = sprintf('/v2/project/%s/session/%s/play-dtmf', $this->apiKey, $sessionId);
564564
if ($connectionId) {
565565
$route = sprintf(
566-
'/v2/projects/%s/session/%s/connection/%s/play-dtmf',
566+
'/v2/project/%s/session/%s/connection/%s/play-dtmf',
567567
$this->apiKey,
568568
$sessionId,
569569
$connectionId

tests/OpenTokTest/ArchiveTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function testStopsArchive()
156156
// TODO: test the dynamically built User Agent string
157157
$userAgent = $request->getHeaderLine('User-Agent');
158158
$this->assertNotEmpty($userAgent);
159-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
159+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
160160

161161
// TODO: test the properties of the actual archive object
162162
$this->assertEquals('stopped', $this->archive->status);
@@ -195,7 +195,7 @@ public function testDeletesArchive()
195195
// TODO: test the dynamically built User Agent string
196196
$userAgent = $request->getHeaderLine('User-Agent');
197197
$this->assertNotEmpty($userAgent);
198-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
198+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
199199

200200
$this->assertTrue($success);
201201
// TODO: assert that all properties of the archive object were cleared

tests/OpenTokTest/OpenTokTest.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function testCreatesDefaultSession()
136136
// TODO: test the dynamically built User Agent string
137137
$userAgent = $request->getHeaderLine('User-Agent');
138138
$this->assertNotEmpty($userAgent);
139-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
139+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
140140

141141
$p2p_preference = $this->getPostField($request, 'p2p.preference');
142142
$this->assertEquals('enabled', $p2p_preference);
@@ -196,7 +196,7 @@ public function testCreatesMediaRoutedAndLocationSession()
196196
// TODO: test the dynamically built User Agent string
197197
$userAgent = $request->getHeaderLine('User-Agent');
198198
$this->assertNotEmpty($userAgent);
199-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
199+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
200200

201201
$location = $this->getPostField($request, 'location');
202202
$this->assertEquals('12.34.56.78', $location);
@@ -244,7 +244,7 @@ public function testCreatesMediaRelayedSession()
244244
// TODO: test the dynamically built User Agent string
245245
$userAgent = $request->getHeaderLine('User-Agent');
246246
$this->assertNotEmpty($userAgent);
247-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
247+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
248248

249249
$p2p_preference = $this->getPostField($request, 'p2p.preference');
250250
$this->assertEquals('enabled', $p2p_preference);
@@ -289,7 +289,7 @@ public function testCreatesAutoArchivedSession()
289289
// TODO: test the dynamically built User Agent string
290290
$userAgent = $request->getHeaderLine('User-Agent');
291291
$this->assertNotEmpty($userAgent);
292-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
292+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
293293

294294
$archiveMode = $this->getPostField($request, 'archiveMode');
295295
$this->assertEquals('always', $archiveMode);
@@ -527,7 +527,7 @@ public function testStartsArchive()
527527
// TODO: test the dynamically built User Agent string
528528
$userAgent = $request->getHeaderLine('User-Agent');
529529
$this->assertNotEmpty($userAgent);
530-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
530+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
531531

532532
$this->assertInstanceOf('OpenTok\Archive', $archive);
533533
$this->assertEquals(0, $archive->duration);
@@ -577,7 +577,7 @@ public function testStartsArchiveNamed()
577577
// TODO: test the dynamically built User Agent string
578578
$userAgent = $request->getHeaderLine('User-Agent');
579579
$this->assertNotEmpty($userAgent);
580-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
580+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
581581

582582
$body = json_decode($request->getBody());
583583
$this->assertEquals($sessionId, $body->sessionId);
@@ -628,7 +628,7 @@ public function testStartsArchiveNamedDeprecated()
628628
// TODO: test the dynamically built User Agent string
629629
$userAgent = $request->getHeaderLine('User-Agent');
630630
$this->assertNotEmpty($userAgent);
631-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
631+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
632632

633633
$body = json_decode($request->getBody());
634634
$this->assertEquals($sessionId, $body->sessionId);
@@ -675,7 +675,7 @@ public function testStartsArchiveAudioOnly()
675675
// TODO: test the dynamically built User Agent string
676676
$userAgent = $request->getHeaderLine('User-Agent');
677677
$this->assertNotEmpty($userAgent);
678-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
678+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
679679

680680
$body = json_decode($request->getBody());
681681
$this->assertEquals($sessionId, $body->sessionId);
@@ -725,7 +725,7 @@ public function testStartsArchiveIndividualOutput()
725725
// TODO: test the dynamically built User Agent string
726726
$userAgent = $request->getHeaderLine('User-Agent');
727727
$this->assertNotEmpty($userAgent);
728-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
728+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
729729

730730
$body = json_decode($request->getBody());
731731
$this->assertEquals($sessionId, $body->sessionId);
@@ -774,7 +774,7 @@ public function testStartsArchiveResolutionSD()
774774
// TODO: test the dynamically built User Agent string
775775
$userAgent = $request->getHeaderLine('User-Agent');
776776
$this->assertNotEmpty($userAgent);
777-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
777+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
778778

779779
$body = json_decode($request->getBody());
780780
$this->assertEquals($sessionId, $body->sessionId);
@@ -822,7 +822,7 @@ public function testStartsArchiveResolutionHD()
822822
// TODO: test the dynamically built User Agent string
823823
$userAgent = $request->getHeaderLine('User-Agent');
824824
$this->assertNotEmpty($userAgent);
825-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
825+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
826826

827827
$body = json_decode($request->getBody());
828828
$this->assertEquals($sessionId, $body->sessionId);
@@ -866,7 +866,7 @@ public function testStopsArchive()
866866
// TODO: test the dynamically built User Agent string
867867
$userAgent = $request->getHeaderLine('User-Agent');
868868
$this->assertNotEmpty($userAgent);
869-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
869+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
870870

871871
$this->assertInstanceOf('OpenTok\Archive', $archive);
872872
// TODO: test the properties of the actual archive object
@@ -905,7 +905,7 @@ public function testGetsArchive()
905905
// TODO: test the dynamically built User Agent string
906906
$userAgent = $request->getHeaderLine('User-Agent');
907907
$this->assertNotEmpty($userAgent);
908-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
908+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
909909

910910
$this->assertInstanceOf('OpenTok\Archive', $archive);
911911
// TODO: test the properties of the actual archive object
@@ -942,7 +942,7 @@ public function testDeletesArchive()
942942
// TODO: test the dynamically built User Agent string
943943
$userAgent = $request->getHeaderLine('User-Agent');
944944
$this->assertNotEmpty($userAgent);
945-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
945+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
946946

947947
$this->assertTrue($success);
948948
// TODO: test the properties of the actual archive object
@@ -977,7 +977,7 @@ public function testListsArchives()
977977
// TODO: test the dynamically built User Agent string
978978
$userAgent = $request->getHeaderLine('User-Agent');
979979
$this->assertNotEmpty($userAgent);
980-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
980+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
981981

982982
$this->assertInstanceOf('OpenTok\ArchiveList', $archiveList);
983983
// TODO: test the properties of the actual archiveList object and its contained archive
@@ -1013,7 +1013,7 @@ public function testListsArchivesWithOffsetAndCount()
10131013
// TODO: test the dynamically built User Agent string
10141014
$userAgent = $request->getHeaderLine('User-Agent');
10151015
$this->assertNotEmpty($userAgent);
1016-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1016+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
10171017

10181018
$this->assertInstanceOf('OpenTok\ArchiveList', $archiveList);
10191019
$this->assertEquals(1, $archiveList->totalCount());
@@ -1054,7 +1054,7 @@ public function testListsArchivesWithSessionId()
10541054
// TODO: test the dynamically built User Agent string
10551055
$userAgent = $request->getHeaderLine('User-Agent');
10561056
$this->assertNotEmpty($userAgent);
1057-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1057+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
10581058

10591059
$this->assertInstanceOf('OpenTok\ArchiveList', $archiveList);
10601060
$this->assertEquals(2, $archiveList->totalCount());
@@ -1138,7 +1138,7 @@ public function testForceDisconnect()
11381138
// TODO: test the dynamically built User Agent string
11391139
$userAgent = $request->getHeaderLine('User-Agent');
11401140
$this->assertNotEmpty($userAgent);
1141-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1141+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
11421142

11431143
$this->assertTrue($success);
11441144
}
@@ -1312,7 +1312,7 @@ public function testStartsBroadcast()
13121312
// TODO: test the dynamically built User Agent string
13131313
$userAgent = $request->getHeaderLine('User-Agent');
13141314
$this->assertNotEmpty($userAgent);
1315-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1315+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
13161316

13171317
$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
13181318
$this->assertIsString($broadcast->id);
@@ -1368,7 +1368,7 @@ public function testStartBroadcastWithOptions()
13681368
// TODO: test the dynamically built User Agent string
13691369
$userAgent = $request->getHeaderLine('User-Agent');
13701370
$this->assertNotEmpty($userAgent);
1371-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1371+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
13721372

13731373
$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
13741374
$this->assertIsString($broadcast->id);
@@ -1415,7 +1415,7 @@ public function testStopsBroadcast()
14151415
// TODO: test the dynamically built User Agent string
14161416
$userAgent = $request->getHeaderLine('User-Agent');
14171417
$this->assertNotEmpty($userAgent);
1418-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1418+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
14191419

14201420
$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
14211421
$this->assertTrue($broadcast->isStopped);
@@ -1452,7 +1452,7 @@ public function testGetsBroadcast()
14521452
// TODO: test the dynamically built User Agent string
14531453
$userAgent = $request->getHeaderLine('User-Agent');
14541454
$this->assertNotEmpty($userAgent);
1455-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1455+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
14561456

14571457
$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
14581458
}
@@ -1496,7 +1496,7 @@ public function testUpdatesBroadcastLayoutWithPredefined()
14961496
// TODO: test the dynamically built User Agent string
14971497
$userAgent = $request->getHeaderLine('User-Agent');
14981498
$this->assertNotEmpty($userAgent);
1499-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1499+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
15001500
}
15011501

15021502
public function testUpdatesBroadcastLayoutWithCustom()
@@ -1542,7 +1542,7 @@ public function testUpdatesBroadcastLayoutWithCustom()
15421542
// TODO: test the dynamically built User Agent string
15431543
$userAgent = $request->getHeaderLine('User-Agent');
15441544
$this->assertNotEmpty($userAgent);
1545-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1545+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
15461546
}
15471547

15481548
public function testUpdatesStreamLayoutClassList()
@@ -1587,7 +1587,7 @@ public function testUpdatesStreamLayoutClassList()
15871587
// TODO: test the dynamically built User Agent string
15881588
$userAgent = $request->getHeaderLine('User-Agent');
15891589
$this->assertNotEmpty($userAgent);
1590-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1590+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
15911591
}
15921592

15931593
public function testGetStream()
@@ -1626,7 +1626,7 @@ public function testGetStream()
16261626

16271627
$userAgent = $request->getHeaderLine('User-Agent');
16281628
$this->assertNotEmpty($userAgent);
1629-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1629+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
16301630
}
16311631

16321632
public function testSipCall()
@@ -1903,7 +1903,7 @@ public function testSignalData()
19031903
// TODO: test the dynamically built User Agent string
19041904
$userAgent = $request->getHeaderLine('User-Agent');
19051905
$this->assertNotEmpty($userAgent);
1906-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1906+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
19071907

19081908
$body = json_decode($request->getBody());
19091909
$this->assertEquals('apple', $body->data);
@@ -1945,7 +1945,7 @@ public function testSignalWithConnectionId()
19451945
// TODO: test the dynamically built User Agent string
19461946
$userAgent = $request->getHeaderLine('User-Agent');
19471947
$this->assertNotEmpty($userAgent);
1948-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
1948+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
19491949

19501950
$body = json_decode($request->getBody());
19511951
$this->assertEquals('random message', $body->data);
@@ -2060,7 +2060,7 @@ public function testListStreams()
20602060
// TODO: test the dynamically built User Agent string
20612061
$userAgent = $request->getHeaderLine('User-Agent');
20622062
$this->assertNotEmpty($userAgent);
2063-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
2063+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
20642064

20652065
$this->assertInstanceOf('OpenTok\StreamList', $streamList);
20662066

@@ -2104,7 +2104,7 @@ public function testsSetArchiveLayoutWithPredefined()
21042104
// TODO: test the dynamically built User Agent string
21052105
$userAgent = $request->getHeaderLine('User-Agent');
21062106
$this->assertNotEmpty($userAgent);
2107-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
2107+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
21082108
}
21092109

21102110
public function testsSetArchiveLayoutWithCustom()
@@ -2150,7 +2150,7 @@ public function testsSetArchiveLayoutWithCustom()
21502150
// TODO: test the dynamically built User Agent string
21512151
$userAgent = $request->getHeaderLine('User-Agent');
21522152
$this->assertNotEmpty($userAgent);
2153-
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.0', $userAgent);
2153+
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.9.1', $userAgent);
21542154
}
21552155

21562156
/**

0 commit comments

Comments
 (0)