Skip to content

Commit

Permalink
chore: Updated Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpratt committed Mar 13, 2024
1 parent 6ba537d commit f6fc001
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 15 deletions.
3 changes: 2 additions & 1 deletion src/Embera/Provider/DailyMotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function getFakeResponse()
preg_match('~/video/([^/]+)~i', (string) $this->url, $matches);
@list($videoId, $videoTitle) = explode('_', $matches['1'], 2);


$embedUrl = 'http://www.dailymotion.com/embed/video/' . $videoId;

$attr = [];
Expand All @@ -74,7 +75,7 @@ public function getFakeResponse()
$attr[] = 'height="{height}"';
$attr[] = 'src="' . $embedUrl . '"';
$attr[] = 'allowfullscreen';
$attr[] = 'allow="autoplay"';
$attr[] = 'allow="autoplay; fullscreen; picture-in-picture; web-share"';

return [
'type' => 'video',
Expand Down
5 changes: 3 additions & 2 deletions src/Embera/Provider/Nanoo.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/**
* Nanoo Provider
*
*
*
* @link https://nanoo.tv
*
Expand Down Expand Up @@ -58,7 +58,7 @@ public function getFakeResponse()
{
preg_match('~/link/v/([^/]+)~i', (string) $this->url, $matches);

$embedUrl = 'https://www.nanoo.tv/code/media.w22?xf_nostart=1;xf_movie_id=' . $matches['1'];
$embedUrl = 'https://www.nanoo.tv/link/' . $matches['1'];

$attr = [];
$attr[] = 'width="{width}"';
Expand All @@ -68,6 +68,7 @@ public function getFakeResponse()
$attr[] = 'allow="autoplay; fullscreen"';
$attr[] = 'allowfullscreen';
$attr[] = 'scrolling="no"';
$attr[] = 'sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-storage-access-by-user-activation"';

return [
'type' => 'video',
Expand Down
3 changes: 1 addition & 2 deletions src/Embera/Provider/Vimeo.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ public function getFakeResponse()
$attr[] = 'width="{width}"';
$attr[] = 'height="{height}"';
$attr[] = 'frameborder="0"';
$attr[] = 'allow="autoplay; fullscreen; picture-in-picture"';
$attr[] = 'allowfullscreen';
$attr[] = 'allow="autoplay; fullscreen; picture-in-picture; clipboard-write"';

return [
'type' => 'video',
Expand Down
2 changes: 1 addition & 1 deletion tests/Embera/Provider/AudioboomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class AudioboomTest extends ProviderTester
{
protected $tasks = array(
'valid_urls' => array(
'https://audioboom.com/posts/8396369-the-world-s-biggest-therapist-with-travis-mills',
'https://audioboom.com/posts/8387868-talking-sh-t-about-your-zodiac-sign-with-larray-pt-2',
),
'invalid_urls' => array(
'http://audioboom.com/posts/other-stuff/7404319-you-cheated-in-my-dream?text=data',
Expand Down
3 changes: 2 additions & 1 deletion tests/Embera/Provider/BeamsFmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class BeamsFmTest extends ProviderTester

public function testProvider()
{
$this->validateProvider('BeamsFm', [ 'width' => 480, 'height' => 270]);
$this->markTestSkipped('The Beams.fm Provider has been disabled as it seems to have changed their business.');
//$this->validateProvider('BeamsFm', [ 'width' => 480, 'height' => 270]);
}
}
3 changes: 2 additions & 1 deletion tests/Embera/Provider/CoubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ final class CoubTest extends ProviderTester

public function testProvider()
{
$this->validateProvider('Coub', [ 'width' => 480, 'height' => 270]);
$this->markTestSkipped('Coub is not working at the moment (2024-03-12)');
//$this->validateProvider('Coub', [ 'width' => 480, 'height' => 270]);
}
}
3 changes: 2 additions & 1 deletion tests/Embera/Provider/GmetriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class GmetriTest extends ProviderTester

public function testProvider()
{
$this->validateProvider('Gmetri', [ 'width' => 480, 'height' => 270]);
$this->markTestSkipped('The Gmetri Provider has been disabled as it seems to have changed their business.');
//$this->validateProvider('Gmetri', [ 'width' => 480, 'height' => 270]);
}
}
3 changes: 2 additions & 1 deletion tests/Embera/Provider/InjurymapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ final class InjurymapTest extends ProviderTester

public function testProvider()
{
$this->validateProvider('Injurymap', [ 'width' => 480, 'height' => 270]);
$this->markTestSkipped('The Injurymap Provider has been disabled as it seems they are now charging for their services.');
// $this->validateProvider('Injurymap', [ 'width' => 480, 'height' => 270]);
}
}
1 change: 1 addition & 0 deletions tests/Embera/Provider/ItemisCreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class ItemisCreateTest extends ProviderTester

public function testProvider()
{
$this->markTestSkipped('The ItemisCreate Provider has been disabled as it seems to be down.');
$this->validateProvider('ItemisCreate', [ 'width' => 480, 'height' => 270]);
}
}
1 change: 0 additions & 1 deletion tests/Embera/Provider/LivestreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ final class LivestreamTest extends ProviderTester
protected $tasks = [
'valid_urls' => [
'http://www.livestream.com/livestream/3camkit',
'https://livestream.com/accounts/16936513/live',
],
'invalid_urls' => [
'https://livestream.com/',
Expand Down
6 changes: 3 additions & 3 deletions tests/Embera/Provider/OutplayedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ final class OutplayedTest extends ProviderTester
{
protected $tasks = [
'valid_urls' => [
'https://outplayed.tv/media/qmjXn/',
'https://outplayed.tv/media/xgwQw/lol-xerath-assist',
'https://outplayed.tv/media/0koveN'
],
'invalid_urls' => [
'https://outplayed.tv/',
Expand All @@ -36,6 +35,7 @@ final class OutplayedTest extends ProviderTester

public function testProvider()
{
$this->validateProvider('Outplayed', [ 'width' => 480, 'height' => 270]);
$this->markTestSkipped('The Outplayed Provider has been disabled as it seems they have stopped providing an oembed endpoint.');
//$this->validateProvider('Outplayed', [ 'width' => 480, 'height' => 270]);
}
}
3 changes: 2 additions & 1 deletion tests/Embera/Provider/SynthesiaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class SynthesiaTest extends ProviderTester

public function testProvider()
{
$this->validateProvider('Synthesia', [ 'width' => 480, 'height' => 270]);
$this->markTestSkipped('The Synthesia Provider requires that we have a private video.');
//$this->validateProvider('Synthesia', [ 'width' => 480, 'height' => 270]);
}
}

0 comments on commit f6fc001

Please sign in to comment.