mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Merge remote-tracking branch 'origin/master' into tls-config
This commit is contained in:
commit
5d015defb8
309 changed files with 14391 additions and 8355 deletions
|
@ -13,7 +13,6 @@
|
|||
namespace Composer\Test\Util;
|
||||
|
||||
use Composer\Util\RemoteFilesystem;
|
||||
use Installer\Exception;
|
||||
|
||||
class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
@ -28,14 +27,6 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$res = $this->callGetOptionsForUrl($io, array('http://example.org', array()));
|
||||
$this->assertTrue(isset($res['http']['header']) && is_array($res['http']['header']), 'getOptions must return an array with headers');
|
||||
$found = false;
|
||||
foreach ($res['http']['header'] as $header) {
|
||||
if (0 === strpos($header, 'User-Agent:')) {
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertTrue($found, 'getOptions must have a User-Agent header');
|
||||
}
|
||||
|
||||
public function testGetOptionsForUrlWithAuthorization()
|
||||
|
@ -119,7 +110,7 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
|||
$io = $this->getMock('Composer\IO\IOInterface');
|
||||
$io
|
||||
->expects($this->once())
|
||||
->method('overwrite')
|
||||
->method('overwriteError')
|
||||
;
|
||||
|
||||
$fs = new RemoteFilesystem($io);
|
||||
|
@ -137,6 +128,9 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertNull($this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, 'HTTP/1.1 404 Not Found', 404, 0, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group slow
|
||||
*/
|
||||
public function testCaptureAuthenticationParamsFromUrl()
|
||||
{
|
||||
$io = $this->getMock('Composer\IO\IOInterface');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue