Use HTTPS URLs in tests

This commit is contained in:
Pierre Rudloff 2022-02-27 23:44:36 +01:00
parent 363bf9b08c
commit dad8b6d704
4 changed files with 11 additions and 11 deletions

View file

@ -153,7 +153,7 @@ class DownloadControllerTest extends ControllerTest
*/ */
public function testDownloadWithMissingPassword() public function testDownloadWithMissingPassword()
{ {
$this->assertRequestIsClientError('download', ['url' => 'http://vimeo.com/68375962']); $this->assertRequestIsClientError('download', ['url' => 'https://vimeo.com/68375962']);
} }
/** /**
@ -164,7 +164,7 @@ class DownloadControllerTest extends ControllerTest
public function testDownloadWithError() public function testDownloadWithError()
{ {
$this->expectException(YoutubedlException::class); $this->expectException(YoutubedlException::class);
$this->getRequestResult('download', ['url' => 'http://example.com/foo']); $this->getRequestResult('download', ['url' => 'https://example.com/foo']);
} }
/** /**

View file

@ -191,7 +191,7 @@ class FrontControllerTest extends ControllerTest
public function testInfoWithPassword() public function testInfoWithPassword()
{ {
$result = $this->controller->info( $result = $this->controller->info(
$this->container->get('request')->withQueryParams(['url' => 'http://vimeo.com/68375962']) $this->container->get('request')->withQueryParams(['url' => 'https://vimeo.com/68375962'])
->withParsedBody(['password' => 'youtube-dl']), ->withParsedBody(['password' => 'youtube-dl']),
$this->container->get('response') $this->container->get('response')
); );
@ -206,8 +206,8 @@ class FrontControllerTest extends ControllerTest
*/ */
public function testInfoWithMissingPassword() public function testInfoWithMissingPassword()
{ {
$this->assertRequestIsClientError('info', ['url' => 'http://vimeo.com/68375962']); $this->assertRequestIsClientError('info', ['url' => 'https://vimeo.com/68375962']);
$this->assertRequestIsClientError('info', ['url' => 'http://vimeo.com/68375962', 'audio' => true]); $this->assertRequestIsClientError('info', ['url' => 'https://vimeo.com/68375962', 'audio' => true]);
} }
/** /**

View file

@ -49,7 +49,7 @@ class JsonControllerTest extends ControllerTest
public function testJsonWithError() public function testJsonWithError()
{ {
$this->expectException(YoutubedlException::class); $this->expectException(YoutubedlException::class);
$this->getRequestResult('json', ['url' => 'http://example.com/foo']); $this->getRequestResult('json', ['url' => 'https://example.com/foo']);
} }
/** /**

View file

@ -104,7 +104,7 @@ class VideoTest extends ContainerTest
*/ */
public function testgetUrlWithPassword() public function testgetUrlWithPassword()
{ {
$video = new Video($this->downloader, 'http://vimeo.com/68375962', 'best', 'youtube-dl'); $video = new Video($this->downloader, 'https://vimeo.com/68375962', 'best', 'youtube-dl');
foreach ($video->getUrl() as $videoURL) { foreach ($video->getUrl() as $videoURL) {
$this->assertStringContainsString('vimeocdn.com', $videoURL); $this->assertStringContainsString('vimeocdn.com', $videoURL);
} }
@ -119,7 +119,7 @@ class VideoTest extends ContainerTest
public function testgetUrlWithMissingPassword() public function testgetUrlWithMissingPassword()
{ {
$this->expectException(PasswordException::class); $this->expectException(PasswordException::class);
$video = new Video($this->downloader, 'http://vimeo.com/68375962', $this->format); $video = new Video($this->downloader, 'https://vimeo.com/68375962', $this->format);
$video->getUrl(); $video->getUrl();
} }
@ -132,7 +132,7 @@ class VideoTest extends ContainerTest
public function testgetUrlWithWrongPassword() public function testgetUrlWithWrongPassword()
{ {
$this->expectException(WrongPasswordException::class); $this->expectException(WrongPasswordException::class);
$video = new Video($this->downloader, 'http://vimeo.com/68375962', 'best', 'foo'); $video = new Video($this->downloader, 'https://vimeo.com/68375962', 'best', 'foo');
$video->getUrl(); $video->getUrl();
} }
@ -174,7 +174,7 @@ class VideoTest extends ContainerTest
'googlevideo.com', 'googlevideo.com',
], ],
[ [
'http://www.bbc.co.uk/programmes/b039g8p7', 'bestaudio/best', 'https://www.bbc.co.uk/programmes/b039g8p7', 'bestaudio/best',
'Kaleidoscope_Leonard_Cohen-b039d07m', 'Kaleidoscope_Leonard_Cohen-b039d07m',
'flv', 'flv',
'bbcodspdns.fcod.llnwd.net', 'bbcodspdns.fcod.llnwd.net',
@ -247,7 +247,7 @@ class VideoTest extends ContainerTest
public function errorUrlProvider(): array public function errorUrlProvider(): array
{ {
return [ return [
['http://example.com/video'], ['https://example.com/video'],
]; ];
} }