Skip to content

Commit

Permalink
Merge pull request #323 from opentok/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
SecondeJK committed Nov 16, 2022
2 parents f9ffb85 + 404f318 commit dd71a9a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
5 changes: 0 additions & 5 deletions src/OpenTok/SipCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
* The ID of the stream connected to the OpenTok session streaming the audio received from
* the SIP call.
*
* @property bool $observeForceMute
* Whether the SIP call honors
* <a href="https://tokbox.com/developer/guides/moderation/#force_mute">force mute moderation</a>.
*/
class SipCall
{
Expand All @@ -32,7 +29,6 @@ public function __construct($sipCallData)
$this->data['id'] = $sipCallData['id'];
$this->data['connectionId'] = $sipCallData['connectionId'];
$this->data['streamId'] = $sipCallData['streamId'];
$this->data['observeForceMute'] = $sipCallData['observeForceMute'];
}

/**
Expand All @@ -45,7 +41,6 @@ public function __get($name)
case 'id':
case 'connectionId':
case 'streamId':
case 'observeForceMute':
return $this->data[$name];
default:
return null;
Expand Down
9 changes: 0 additions & 9 deletions tests/OpenTokTest/OpenTokTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
use OpenTok\MediaMode;
use ArgumentCountError;
use DomainException;
use Exception;
use GuzzleHttp\Exception\GuzzleException;
use OpenTok\OutputMode;
use OpenTok\ArchiveMode;
use OpenTok\StreamMode;
Expand All @@ -19,12 +17,7 @@
use GuzzleHttp\HandlerStack;
use PHPUnit\Framework\TestCase;
use GuzzleHttp\Handler\MockHandler;
use InvalidArgumentException as GlobalInvalidArgumentException;
use OpenTok\Exception\AuthenticationException;
use OpenTok\Exception\DomainException as ExceptionDomainException;
use OpenTok\Exception\InvalidArgumentException;
use RuntimeException;
use OpenTok\Exception\UnexpectedValueException;

define('OPENTOK_DEBUG', true);

Expand Down Expand Up @@ -2237,7 +2230,6 @@ public function testSipCallVideo(): void
$this->assertNotNull($sipCall->id);
$this->assertNotNull($sipCall->connectionId);
$this->assertNotNull($sipCall->streamId);
$this->assertEquals(false, $sipCall->observeForceMute);

$this->assertCount(1, $this->historyContainer);
$request = $this->historyContainer[0]['request'];
Expand Down Expand Up @@ -2271,7 +2263,6 @@ public function testSipCallVideoWithObserveForceMute(): void
$this->assertNotNull($sipCall->id);
$this->assertNotNull($sipCall->connectionId);
$this->assertNotNull($sipCall->streamId);
$this->assertEquals(true, $sipCall->observeForceMute);

$this->assertCount(1, $this->historyContainer);
$request = $this->historyContainer[0]['request'];
Expand Down
24 changes: 24 additions & 0 deletions tests/OpenTokTest/SipCallTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
namespace OpenTokTest;

use OpenTok\SipCall;
use PHPUnit\Framework\TestCase;

class SipCallTest extends TestCase
{
public function testSipCallAttributes(): void
{
$sipCallData = [
'id' => '1_MX4xMjM0NTY3OH4',
'connectionId' => 'VGh1IEZlYiAyNyAwNDozODozMSBQU1QgMjAxNH4wLjI0NDgyMjI',
'streamId' => '0123456789abcdef0123456789abcdef0123456789'
];

$sipCall = new SipCall($sipCallData);

$this->assertEquals('1_MX4xMjM0NTY3OH4', $sipCall->id);
$this->assertEquals('VGh1IEZlYiAyNyAwNDozODozMSBQU1QgMjAxNH4wLjI0NDgyMjI', $sipCall->connectionId);
$this->assertEquals('0123456789abcdef0123456789abcdef0123456789', $sipCall->streamId);
$this->assertNull($sipCall->observeForceMute);
}
}
3 changes: 1 addition & 2 deletions tests/mock/v2/project/APIKEY/dial
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id" : "1bae377f-d620-4e58-86c0-5a37364eec0c",
"connectionId" : "da9cb410-e29b-4c2d-ab9e-fe65bf83fcaf",
"streamId" : "e6f13213-22cb-45de-b71d-af7cef329954",
"observeForceMute" : false
"streamId" : "e6f13213-22cb-45de-b71d-af7cef329954"
}
3 changes: 1 addition & 2 deletions tests/mock/v2/project/APIKEY/dialForceMute
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id" : "1bae377f-d620-4e58-86c0-5a37364eec0c",
"connectionId" : "da9cb410-e29b-4c2d-ab9e-fe65bf83fcaf",
"streamId" : "e6f13213-22cb-45de-b71d-af7cef329954",
"observeForceMute" : true
"streamId" : "e6f13213-22cb-45de-b71d-af7cef329954"
}

0 comments on commit dd71a9a

Please sign in to comment.