Fix 5.3.3 build
parent
8766c7072b
commit
be235ffc19
|
@ -6,10 +6,6 @@ php:
|
|||
- 5.4
|
||||
- 5.5
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 5.3.3
|
||||
|
||||
before_script:
|
||||
- echo '' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
|
||||
- composer install --dev --prefer-source
|
||||
|
|
|
@ -33,6 +33,10 @@ class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testProcessUrl()
|
||||
{
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->markTestSkipped('Requires openssl');
|
||||
}
|
||||
|
||||
$downloader = $this->getMockForAbstractClass('Composer\Downloader\ArchiveDownloader', array($this->getMock('Composer\IO\IOInterface'), $this->getMock('Composer\Config')));
|
||||
$method = new \ReflectionMethod($downloader, 'processUrl');
|
||||
$method->setAccessible(true);
|
||||
|
@ -40,15 +44,15 @@ class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
$expected = 'https://github.com/composer/composer/zipball/master';
|
||||
$url = $method->invoke($downloader, $this->getMock('Composer\Package\PackageInterface'), $expected);
|
||||
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->assertEquals($expected, $url);
|
||||
} else {
|
||||
$this->assertEquals('http://nodeload.github.com/composer/composer/zip/master', $url);
|
||||
}
|
||||
$this->assertEquals($expected, $url);
|
||||
}
|
||||
|
||||
public function testProcessUrl2()
|
||||
{
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->markTestSkipped('Requires openssl');
|
||||
}
|
||||
|
||||
$downloader = $this->getMockForAbstractClass('Composer\Downloader\ArchiveDownloader', array($this->getMock('Composer\IO\IOInterface'), $this->getMock('Composer\Config')));
|
||||
$method = new \ReflectionMethod($downloader, 'processUrl');
|
||||
$method->setAccessible(true);
|
||||
|
@ -56,15 +60,15 @@ class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
$expected = 'https://github.com/composer/composer/archive/master.tar.gz';
|
||||
$url = $method->invoke($downloader, $this->getMock('Composer\Package\PackageInterface'), $expected);
|
||||
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->assertEquals($expected, $url);
|
||||
} else {
|
||||
$this->assertEquals('http://nodeload.github.com/composer/composer/tar.gz/master', $url);
|
||||
}
|
||||
$this->assertEquals($expected, $url);
|
||||
}
|
||||
|
||||
public function testProcessUrl3()
|
||||
{
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->markTestSkipped('Requires openssl');
|
||||
}
|
||||
|
||||
$downloader = $this->getMockForAbstractClass('Composer\Downloader\ArchiveDownloader', array($this->getMock('Composer\IO\IOInterface'), $this->getMock('Composer\Config')));
|
||||
$method = new \ReflectionMethod($downloader, 'processUrl');
|
||||
$method->setAccessible(true);
|
||||
|
@ -72,11 +76,7 @@ class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
$expected = 'https://api.github.com/repos/composer/composer/zipball/master';
|
||||
$url = $method->invoke($downloader, $this->getMock('Composer\Package\PackageInterface'), $expected);
|
||||
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->assertEquals($expected, $url);
|
||||
} else {
|
||||
$this->assertEquals('http://nodeload.github.com/composer/composer/zip/master', $url);
|
||||
}
|
||||
$this->assertEquals($expected, $url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,6 +84,10 @@ class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testProcessUrlRewriteDist($url)
|
||||
{
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->markTestSkipped('Requires openssl');
|
||||
}
|
||||
|
||||
$downloader = $this->getMockForAbstractClass('Composer\Downloader\ArchiveDownloader', array($this->getMock('Composer\IO\IOInterface'), $this->getMock('Composer\Config')));
|
||||
$method = new \ReflectionMethod($downloader, 'processUrl');
|
||||
$method->setAccessible(true);
|
||||
|
@ -97,11 +101,7 @@ class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
->will($this->returnValue('ref'));
|
||||
$url = $method->invoke($downloader, $package, $url);
|
||||
|
||||
if (extension_loaded('openssl')) {
|
||||
$this->assertEquals($expected, $url);
|
||||
} else {
|
||||
$this->assertEquals('http://nodeload.github.com/composer/composer/'.$type.'/ref', $url);
|
||||
}
|
||||
$this->assertEquals($expected, $url);
|
||||
}
|
||||
|
||||
public function provideUrls()
|
||||
|
|
Loading…
Reference in New Issue