-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99f6076
commit 4c08855
Showing
6 changed files
with
153 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace Tests; | ||
|
||
use LiveStream\LiveStream; | ||
use PHPUnit\Framework\TestCase; | ||
use LiveStream\Resources\RTMPKey; | ||
|
||
class RTMPKeyTest extends TestCase | ||
{ | ||
/** | ||
* Undocumented function | ||
* | ||
* @return void | ||
*/ | ||
public function testCanFetchRtmpKey():void | ||
{ | ||
$livestream = new LiveStream('abc'); | ||
|
||
$key = $livestream->getRtmpKey(5637245, 5201483); | ||
|
||
$this->assertInstanceOf(RTMPKey::class, $key); | ||
|
||
$this->assertEquals('m5m-25d-jr6-7yk?n=1&p=0', $key->id); | ||
$this->assertEquals('m5m-25d-jr6-7yk?n=1&p=0', $key->getId()); | ||
|
||
$this->assertEquals('rtmp://rtmpin.livestreamingest.com/rtmpin', $key->getUrl()); | ||
$this->assertEquals('rtmp://rtmpin.livestreamingest.com/rtmpin', $key->rtmpUrl); | ||
} | ||
|
||
/** | ||
* Undocumented function | ||
* | ||
* @return void | ||
*/ | ||
public function testCanResetRtmpKey():void | ||
{ | ||
$livestream = new LiveStream('abc'); | ||
|
||
$key = $livestream->resetRtmpKey(5637245, 5201483); | ||
|
||
$this->assertInstanceOf(RTMPKey::class, $key); | ||
|
||
$this->assertEquals('m5m-25d-jr6-7yk', $key->id); | ||
$this->assertEquals('m5m-25d-jr6-7yk', $key->getId()); | ||
|
||
$this->assertEquals('rtmp://rtmpin.livestreamingest.com/rtmpin', $key->getUrl()); | ||
$this->assertEquals('rtmp://rtmpin.livestreamingest.com/rtmpin', $key->rtmpUrl); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
An Invalid Poster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters