From f6fc001773bcee1d8fd81a129b77ecd6f028c95a Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 12 Mar 2024 23:40:43 -0500 Subject: [PATCH] chore: Updated Tests --- src/Embera/Provider/DailyMotion.php | 3 ++- src/Embera/Provider/Nanoo.php | 5 +++-- src/Embera/Provider/Vimeo.php | 3 +-- tests/Embera/Provider/AudioboomTest.php | 2 +- tests/Embera/Provider/BeamsFmTest.php | 3 ++- tests/Embera/Provider/CoubTest.php | 3 ++- tests/Embera/Provider/GmetriTest.php | 3 ++- tests/Embera/Provider/InjurymapTest.php | 3 ++- tests/Embera/Provider/ItemisCreateTest.php | 1 + tests/Embera/Provider/LivestreamTest.php | 1 - tests/Embera/Provider/OutplayedTest.php | 6 +++--- tests/Embera/Provider/SynthesiaTest.php | 3 ++- 12 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/Embera/Provider/DailyMotion.php b/src/Embera/Provider/DailyMotion.php index a7ad1ba4..dd01932d 100755 --- a/src/Embera/Provider/DailyMotion.php +++ b/src/Embera/Provider/DailyMotion.php @@ -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 = []; @@ -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', diff --git a/src/Embera/Provider/Nanoo.php b/src/Embera/Provider/Nanoo.php index aaafac47..2e3c7000 100644 --- a/src/Embera/Provider/Nanoo.php +++ b/src/Embera/Provider/Nanoo.php @@ -16,7 +16,7 @@ /** * Nanoo Provider - * + * * * @link https://nanoo.tv * @@ -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}"'; @@ -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', diff --git a/src/Embera/Provider/Vimeo.php b/src/Embera/Provider/Vimeo.php index b4a54240..91b2f343 100644 --- a/src/Embera/Provider/Vimeo.php +++ b/src/Embera/Provider/Vimeo.php @@ -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', diff --git a/tests/Embera/Provider/AudioboomTest.php b/tests/Embera/Provider/AudioboomTest.php index 743bd67f..beebb984 100755 --- a/tests/Embera/Provider/AudioboomTest.php +++ b/tests/Embera/Provider/AudioboomTest.php @@ -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', diff --git a/tests/Embera/Provider/BeamsFmTest.php b/tests/Embera/Provider/BeamsFmTest.php index a7de89de..0e353c56 100644 --- a/tests/Embera/Provider/BeamsFmTest.php +++ b/tests/Embera/Provider/BeamsFmTest.php @@ -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]); } } diff --git a/tests/Embera/Provider/CoubTest.php b/tests/Embera/Provider/CoubTest.php index 5b0aa6b3..d517c691 100755 --- a/tests/Embera/Provider/CoubTest.php +++ b/tests/Embera/Provider/CoubTest.php @@ -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]); } } diff --git a/tests/Embera/Provider/GmetriTest.php b/tests/Embera/Provider/GmetriTest.php index 22c290c8..fce17e3c 100644 --- a/tests/Embera/Provider/GmetriTest.php +++ b/tests/Embera/Provider/GmetriTest.php @@ -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]); } } diff --git a/tests/Embera/Provider/InjurymapTest.php b/tests/Embera/Provider/InjurymapTest.php index 1ee83a7b..53d26cd7 100644 --- a/tests/Embera/Provider/InjurymapTest.php +++ b/tests/Embera/Provider/InjurymapTest.php @@ -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]); } } diff --git a/tests/Embera/Provider/ItemisCreateTest.php b/tests/Embera/Provider/ItemisCreateTest.php index 6f188a0e..787e76b4 100644 --- a/tests/Embera/Provider/ItemisCreateTest.php +++ b/tests/Embera/Provider/ItemisCreateTest.php @@ -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]); } } diff --git a/tests/Embera/Provider/LivestreamTest.php b/tests/Embera/Provider/LivestreamTest.php index 1cf608dd..6e1db50f 100644 --- a/tests/Embera/Provider/LivestreamTest.php +++ b/tests/Embera/Provider/LivestreamTest.php @@ -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/', diff --git a/tests/Embera/Provider/OutplayedTest.php b/tests/Embera/Provider/OutplayedTest.php index 50c7ea3d..12a02d7b 100644 --- a/tests/Embera/Provider/OutplayedTest.php +++ b/tests/Embera/Provider/OutplayedTest.php @@ -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/', @@ -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]); } } diff --git a/tests/Embera/Provider/SynthesiaTest.php b/tests/Embera/Provider/SynthesiaTest.php index a52e27e5..4e0450d7 100644 --- a/tests/Embera/Provider/SynthesiaTest.php +++ b/tests/Embera/Provider/SynthesiaTest.php @@ -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]); } }