Fix tests when openssl is disabled
parent
502048bfd8
commit
2249dd0548
|
@ -23,8 +23,10 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
{
|
||||
public function testPrivateRepository()
|
||||
{
|
||||
$scheme = extension_loaded('openssl') ? 'https' : 'http';
|
||||
|
||||
$repoUrl = 'http://github.com/composer/packagist';
|
||||
$repoApiUrl = 'https://api.github.com/repos/composer/packagist';
|
||||
$repoApiUrl = $scheme.'://api.github.com/repos/composer/packagist';
|
||||
$repoSshUrl = 'git@github.com:composer/packagist.git';
|
||||
$identifier = 'v0.0.0';
|
||||
$sha = 'SOMESHA';
|
||||
|
@ -70,7 +72,7 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$dist = $gitHubDriver->getDist($identifier);
|
||||
$this->assertEquals('zip', $dist['type']);
|
||||
$this->assertEquals('https://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals($scheme.'://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals('v0.0.0', $dist['reference']);
|
||||
|
||||
$source = $gitHubDriver->getSource($identifier);
|
||||
|
@ -80,7 +82,7 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$dist = $gitHubDriver->getDist($sha);
|
||||
$this->assertEquals('zip', $dist['type']);
|
||||
$this->assertEquals('https://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals($scheme.'://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals('v0.0.0', $dist['reference']);
|
||||
|
||||
$source = $gitHubDriver->getSource($sha);
|
||||
|
@ -91,8 +93,10 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testPublicRepository()
|
||||
{
|
||||
$scheme = extension_loaded('openssl') ? 'https' : 'http';
|
||||
|
||||
$repoUrl = 'http://github.com/composer/packagist';
|
||||
$repoApiUrl = 'https://api.github.com/repos/composer/packagist';
|
||||
$repoApiUrl = $scheme.'://api.github.com/repos/composer/packagist';
|
||||
$identifier = 'v0.0.0';
|
||||
$sha = 'SOMESHA';
|
||||
|
||||
|
@ -118,7 +122,7 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$dist = $gitHubDriver->getDist($identifier);
|
||||
$this->assertEquals('zip', $dist['type']);
|
||||
$this->assertEquals('https://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals($scheme.'://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals($identifier, $dist['reference']);
|
||||
|
||||
$source = $gitHubDriver->getSource($identifier);
|
||||
|
@ -128,7 +132,7 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$dist = $gitHubDriver->getDist($sha);
|
||||
$this->assertEquals('zip', $dist['type']);
|
||||
$this->assertEquals('https://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals($scheme.'://github.com/composer/packagist/zipball/v0.0.0', $dist['url']);
|
||||
$this->assertEquals($identifier, $dist['reference']);
|
||||
|
||||
$source = $gitHubDriver->getSource($sha);
|
||||
|
@ -139,8 +143,10 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testPrivateRepositoryNoInteraction()
|
||||
{
|
||||
$scheme = extension_loaded('openssl') ? 'https' : 'http';
|
||||
|
||||
$repoUrl = 'http://github.com/composer/packagist';
|
||||
$repoApiUrl = 'https://api.github.com/repos/composer/packagist';
|
||||
$repoApiUrl = $scheme.'://api.github.com/repos/composer/packagist';
|
||||
$repoSshUrl = 'git@github.com:composer/packagist.git';
|
||||
$identifier = 'v0.0.0';
|
||||
$sha = 'SOMESHA';
|
||||
|
|
Loading…
Reference in New Issue