From b82aa40526b270b663b698a61fc65b045a8f6a20 Mon Sep 17 00:00:00 2001 From: Manik Date: Mon, 13 Aug 2018 10:37:43 -0700 Subject: [PATCH] Update to version 4.2.0 --- README.md | 2 +- src/OpenTok/Util/Client.php | 2 +- tests/OpenTok/ArchiveTest.php | 4 +-- tests/OpenTok/OpenTokTest.php | 56 +++++++++++++++++------------------ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 64ec7e62..df248440 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this package (`opentok/opentok`) to your `composer.json` file, or just run t command line: ``` -$ ./composer.phar require opentok/opentok 4.1.x +$ ./composer.phar require opentok/opentok 4.2.x ``` ## Manually: diff --git a/src/OpenTok/Util/Client.php b/src/OpenTok/Util/Client.php index 54599529..2bf2db44 100755 --- a/src/OpenTok/Util/Client.php +++ b/src/OpenTok/Util/Client.php @@ -38,7 +38,7 @@ // TODO: build this dynamically /** @internal */ -define('OPENTOK_SDK_VERSION', '4.1.2-alpha.1'); +define('OPENTOK_SDK_VERSION', '4.2.0'); /** @internal */ define('OPENTOK_SDK_USER_AGENT', 'OpenTok-PHP-SDK/' . OPENTOK_SDK_VERSION); diff --git a/tests/OpenTok/ArchiveTest.php b/tests/OpenTok/ArchiveTest.php index 8e931353..4e5fa837 100644 --- a/tests/OpenTok/ArchiveTest.php +++ b/tests/OpenTok/ArchiveTest.php @@ -156,7 +156,7 @@ public function testStopsArchive() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); // TODO: test the properties of the actual archive object $this->assertEquals('stopped', $this->archive->status); @@ -195,7 +195,7 @@ public function testDeletesArchive() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertTrue($success); // TODO: assert that all properties of the archive object were cleared diff --git a/tests/OpenTok/OpenTokTest.php b/tests/OpenTok/OpenTokTest.php index a0eb771d..43b6b121 100644 --- a/tests/OpenTok/OpenTokTest.php +++ b/tests/OpenTok/OpenTokTest.php @@ -126,7 +126,7 @@ public function testCreatesDefaultSession() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $p2p_preference = $this->getPostField($request, 'p2p.preference'); $this->assertEquals('enabled', $p2p_preference); @@ -186,7 +186,7 @@ public function testCreatesMediaRoutedAndLocationSession() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $location = $this->getPostField($request, 'location'); $this->assertEquals('12.34.56.78', $location); @@ -234,7 +234,7 @@ public function testCreatesMediaRelayedSession() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $p2p_preference = $this->getPostField($request, 'p2p.preference'); $this->assertEquals('enabled', $p2p_preference); @@ -279,7 +279,7 @@ public function testCreatesAutoArchivedSession() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $archiveMode = $this->getPostField($request, 'archiveMode'); $this->assertEquals('always', $archiveMode); @@ -485,7 +485,7 @@ public function testStartsArchive() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\Archive', $archive); $this->assertEquals(0, $archive->duration); @@ -535,7 +535,7 @@ public function testStartsArchiveNamed() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals($sessionId, $body->sessionId); @@ -583,7 +583,7 @@ public function testStartsArchiveNamedDeprecated() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals($sessionId, $body->sessionId); @@ -630,7 +630,7 @@ public function testStartsArchiveAudioOnly() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals($sessionId, $body->sessionId); @@ -680,7 +680,7 @@ public function testStartsArchiveIndividualOutput() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals($sessionId, $body->sessionId); @@ -729,7 +729,7 @@ public function testStartsArchiveResolutionSD() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals($sessionId, $body->sessionId); @@ -777,7 +777,7 @@ public function testStartsArchiveResolutionHD() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals($sessionId, $body->sessionId); @@ -821,7 +821,7 @@ public function testStopsArchive() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\Archive', $archive); // TODO: test the properties of the actual archive object @@ -860,7 +860,7 @@ public function testGetsArchive() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\Archive', $archive); // TODO: test the properties of the actual archive object @@ -897,7 +897,7 @@ public function testDeletesArchive() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertTrue($success); // TODO: test the properties of the actual archive object @@ -932,7 +932,7 @@ public function testListsArchives() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\ArchiveList', $archiveList); // TODO: test the properties of the actual archiveList object and its contained archive @@ -968,7 +968,7 @@ public function testListsArchivesWithOffsetAndCount() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\ArchiveList', $archiveList); $this->assertEquals(1, $archiveList->totalCount()); @@ -1009,7 +1009,7 @@ public function testListsArchivesWithSessionId() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\ArchiveList', $archiveList); $this->assertEquals(2, $archiveList->totalCount()); @@ -1095,7 +1095,7 @@ public function testForceDisconnect() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertTrue($success); } @@ -1156,7 +1156,7 @@ public function testStartsBroadcast() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\Broadcast', $broadcast); $this->assertInternalType('string', $broadcast->id); @@ -1201,7 +1201,7 @@ public function testStopsBroadcast() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\Broadcast', $broadcast); $this->assertTrue($broadcast->isStopped); @@ -1238,7 +1238,7 @@ public function testGetsBroadcast() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\Broadcast', $broadcast); } @@ -1282,7 +1282,7 @@ public function testUpdatesBroadcastLayoutWithPredefined() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); } public function testUpdatesBroadcastLayoutWithCustom() @@ -1328,7 +1328,7 @@ public function testUpdatesBroadcastLayoutWithCustom() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); } public function testUpdatesStreamLayoutClassList() @@ -1373,7 +1373,7 @@ public function testUpdatesStreamLayoutClassList() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); } public function testGetStream() @@ -1412,7 +1412,7 @@ public function testGetStream() $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); } @@ -1581,7 +1581,7 @@ public function testSignalData() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals('apple', $body->data); @@ -1623,7 +1623,7 @@ public function testSignalWithConnectionId() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $body = json_decode($request->getBody()); $this->assertEquals('random message', $body->data); @@ -1734,7 +1734,7 @@ public function testListStreams() // TODO: test the dynamically built User Agent string $userAgent = $request->getHeaderLine('User-Agent'); $this->assertNotEmpty($userAgent); - $this->assertStringStartsWith('OpenTok-PHP-SDK/4.1.2-alpha.1', $userAgent); + $this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.0', $userAgent); $this->assertInstanceOf('OpenTok\StreamList', $streamList);