|
@@ -13,6 +13,7 @@
|
|
namespace Composer\Test\Util;
|
|
namespace Composer\Test\Util;
|
|
|
|
|
|
use Composer\Util\RemoteFilesystem;
|
|
use Composer\Util\RemoteFilesystem;
|
|
|
|
+use Installer\Exception;
|
|
|
|
|
|
class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
|
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()
|
|
public function testGetContents()
|
|
{
|
|
{
|
|
$fs = new RemoteFilesystem($this->getMock('Composer\IO\IOInterface'));
|
|
$fs = new RemoteFilesystem($this->getMock('Composer\IO\IOInterface'));
|