mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
allow FileDownloader to use username:password@ info when downloading through https?
This commit is contained in:
parent
d498e73363
commit
cc1e10e8ae
2 changed files with 20 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
namespace Composer\Test\Util;
|
||||
|
||||
use Composer\Util\RemoteFilesystem;
|
||||
use Installer\Exception;
|
||||
|
||||
class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
@ -143,6 +144,19 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public function testCaptureAuthenticationParamsFromUrl()
|
||||
{
|
||||
$io = $this->getMock('Composer\IO\IOInterface');
|
||||
$io
|
||||
->expects($this->once())
|
||||
->method('setAuthentication')
|
||||
;
|
||||
|
||||
$fs = new RemoteFilesystem($io);
|
||||
$fs->getContents('example.com', 'http://user:pass@www.example.com/something');
|
||||
}
|
||||
|
||||
public function testGetContents()
|
||||
{
|
||||
$fs = new RemoteFilesystem($this->getMock('Composer\IO\IOInterface'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue