diff --git a/tests/FrontControllerTest.php b/tests/FrontControllerTest.php index 42b9d19..ee4490c 100644 --- a/tests/FrontControllerTest.php +++ b/tests/FrontControllerTest.php @@ -292,6 +292,9 @@ class FrontControllerTest extends TestCase */ public function testVideoWithVimeoAudio() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } // So we can test the fallback to default format $this->assertRequestIsOk('video', ['url' => 'https://vimeo.com/251997032', 'audio' => true]); } @@ -319,6 +322,9 @@ class FrontControllerTest extends TestCase */ public function testVideoWithPassword() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } $result = $this->controller->video( $this->request->withQueryParams(['url' => 'http://vimeo.com/68375962']) ->withParsedBody(['password' => 'youtube-dl']), @@ -334,6 +340,9 @@ class FrontControllerTest extends TestCase */ public function testVideoWithMissingPassword() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } $this->assertRequestIsOk('video', ['url' => 'http://vimeo.com/68375962']); $this->assertRequestIsOk('video', ['url' => 'http://vimeo.com/68375962', 'audio' => true]); } @@ -502,6 +511,9 @@ class FrontControllerTest extends TestCase */ public function testRedirectWithMissingPassword() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } $this->assertRequestIsRedirect('redirect', ['url' => 'http://vimeo.com/68375962']); } diff --git a/tests/VideoDownloadTest.php b/tests/VideoDownloadTest.php index f93a249..0614d95 100644 --- a/tests/VideoDownloadTest.php +++ b/tests/VideoDownloadTest.php @@ -117,6 +117,9 @@ class VideoDownloadTest extends TestCase */ public function testGetURLWithPassword() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } $videoURL = $this->download->getURL('http://vimeo.com/68375962', null, 'youtube-dl'); $this->assertContains('vimeocdn.com', $videoURL[0]); } @@ -129,6 +132,9 @@ class VideoDownloadTest extends TestCase */ public function testGetURLWithMissingPassword() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } $this->download->getURL('http://vimeo.com/68375962'); } @@ -140,6 +146,9 @@ class VideoDownloadTest extends TestCase */ public function testGetURLWithWrongPassword() { + if (getenv('CI')) { + $this->markTestSkipped('Travis is blacklisted by Vimeo.'); + } $this->download->getURL('http://vimeo.com/68375962', null, 'foo'); } @@ -164,7 +173,7 @@ class VideoDownloadTest extends TestCase */ public function urlProvider() { - return [ + $videos = [ [ 'https://www.youtube.com/watch?v=M7IpKCZ47pU', 'best[protocol^=http]', 'It_s_Not_Me_It_s_You_-_Hearts_Under_Fire-M7IpKCZ47pU', @@ -178,12 +187,6 @@ class VideoDownloadTest extends TestCase 'mp4', 'googlevideo.com', ], - [ - 'https://vimeo.com/24195442', 'best[protocol^=http]', - 'Carving_the_Mountains-24195442', - 'mp4', - 'vimeocdn.com', - ], [ 'http://www.bbc.co.uk/programmes/b039g8p7', 'bestaudio/best', 'Kaleidoscope_Leonard_Cohen-b039d07m', @@ -203,6 +206,18 @@ class VideoDownloadTest extends TestCase 'openload.co', ], ]; + + if (!getenv('CI')) { + // Travis is blacklisted by Vimeo. + $videos[] = [ + 'https://vimeo.com/24195442', 'best[protocol^=http]', + 'Carving_the_Mountains-24195442', + 'mp4', + 'vimeocdn.com', + ]; + } + + return $videos; } /**