Skip to content

Commit

Permalink
Update to version 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
msach22 committed Oct 5, 2018
1 parent 0e99bcc commit 687c7f0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Add this package (`opentok/opentok`) to your `composer.json` file, or just run t
command line:

```
$ ./composer.phar require opentok/opentok 4.2.x
$ ./composer.phar require opentok/opentok 4.3.x
```

### Manually:
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTok/Util/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

// TODO: build this dynamically
/** @internal */
define('OPENTOK_SDK_VERSION', '4.2.1-alpha.1');
define('OPENTOK_SDK_VERSION', '4.3.0');
/** @internal */
define('OPENTOK_SDK_USER_AGENT', 'OpenTok-PHP-SDK/' . OPENTOK_SDK_VERSION);

Expand Down
4 changes: 2 additions & 2 deletions tests/OpenTok/ArchiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

// TODO: test the properties of the actual archive object
$this->assertEquals('stopped', $this->archive->status);
Expand Down Expand Up @@ -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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertTrue($success);
// TODO: assert that all properties of the archive object were cleared
Expand Down
60 changes: 30 additions & 30 deletions tests/OpenTok/OpenTokTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$p2p_preference = $this->getPostField($request, 'p2p.preference');
$this->assertEquals('enabled', $p2p_preference);
Expand Down Expand Up @@ -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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$location = $this->getPostField($request, 'location');
$this->assertEquals('12.34.56.78', $location);
Expand Down Expand Up @@ -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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$p2p_preference = $this->getPostField($request, 'p2p.preference');
$this->assertEquals('enabled', $p2p_preference);
Expand Down Expand Up @@ -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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$archiveMode = $this->getPostField($request, 'archiveMode');
$this->assertEquals('always', $archiveMode);
Expand Down Expand Up @@ -521,7 +521,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\Archive', $archive);
$this->assertEquals(0, $archive->duration);
Expand Down Expand Up @@ -571,7 +571,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals($sessionId, $body->sessionId);
Expand Down Expand Up @@ -619,7 +619,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals($sessionId, $body->sessionId);
Expand Down Expand Up @@ -666,7 +666,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals($sessionId, $body->sessionId);
Expand Down Expand Up @@ -716,7 +716,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals($sessionId, $body->sessionId);
Expand Down Expand Up @@ -765,7 +765,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals($sessionId, $body->sessionId);
Expand Down Expand Up @@ -813,7 +813,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals($sessionId, $body->sessionId);
Expand Down Expand Up @@ -857,7 +857,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\Archive', $archive);
// TODO: test the properties of the actual archive object
Expand Down Expand Up @@ -896,7 +896,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\Archive', $archive);
// TODO: test the properties of the actual archive object
Expand Down Expand Up @@ -933,7 +933,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertTrue($success);
// TODO: test the properties of the actual archive object
Expand Down Expand Up @@ -968,7 +968,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\ArchiveList', $archiveList);
// TODO: test the properties of the actual archiveList object and its contained archive
Expand Down Expand Up @@ -1004,7 +1004,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\ArchiveList', $archiveList);
$this->assertEquals(1, $archiveList->totalCount());
Expand Down Expand Up @@ -1045,7 +1045,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\ArchiveList', $archiveList);
$this->assertEquals(2, $archiveList->totalCount());
Expand Down Expand Up @@ -1131,7 +1131,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertTrue($success);
}
Expand Down Expand Up @@ -1192,7 +1192,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
$this->assertInternalType('string', $broadcast->id);
Expand Down Expand Up @@ -1237,7 +1237,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
$this->assertTrue($broadcast->isStopped);
Expand Down Expand Up @@ -1274,7 +1274,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$this->assertInstanceOf('OpenTok\Broadcast', $broadcast);
}
Expand Down Expand Up @@ -1318,7 +1318,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);
}

public function testUpdatesBroadcastLayoutWithCustom()
Expand Down Expand Up @@ -1364,7 +1364,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);
}

public function testUpdatesStreamLayoutClassList()
Expand Down Expand Up @@ -1409,7 +1409,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);
}

public function testGetStream()
Expand Down Expand Up @@ -1448,7 +1448,7 @@ public function testGetStream()

$userAgent = $request->getHeaderLine('User-Agent');
$this->assertNotEmpty($userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);
}

public function testSipCall()
Expand Down Expand Up @@ -1616,7 +1616,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals('apple', $body->data);
Expand Down Expand Up @@ -1658,7 +1658,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

$body = json_decode($request->getBody());
$this->assertEquals('random message', $body->data);
Expand Down Expand Up @@ -1769,7 +1769,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.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);

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

Expand Down Expand Up @@ -1813,7 +1813,7 @@ public function testsSetArchiveLayoutWithPredefined()
// TODO: test the dynamically built User Agent string
$userAgent = $request->getHeaderLine('User-Agent');
$this->assertNotEmpty($userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);
}

public function testsSetArchiveLayoutWithCustom()
Expand Down Expand Up @@ -1859,7 +1859,7 @@ public function testsSetArchiveLayoutWithCustom()
// TODO: test the dynamically built User Agent string
$userAgent = $request->getHeaderLine('User-Agent');
$this->assertNotEmpty($userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.2.1-alpha.1', $userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/4.3.0', $userAgent);
}

}
Expand Down

0 comments on commit 687c7f0

Please sign in to comment.