1
0
Fork 0

Replaced changes in RemoteFilesystemTest with changes from main branch.

pull/2184/merge^2
matt-whittom 2013-08-13 10:04:47 -05:00 committed by mwhittom
parent 7fdcdb4c54
commit 997b1b5d46
1 changed files with 27 additions and 22 deletions

View File

@ -148,13 +148,18 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
public function testCaptureAuthenticationParamsFromUrl()
{
$io = $this->getMock('Composer\IO\IOInterface');
$io
->expects($this->once())
$io->expects($this->once())
->method('setAuthentication')
;
->with($this->equalTo('example.com'), $this->equalTo('user'), $this->equalTo('pass'));
$fs = new RemoteFilesystem($io);
$fs->getContents('example.com', 'http://user:pass@www.example.com');
try {
$fs->getContents('example.com', 'http://user:pass@www.example.com/something');
} catch (\Exception $e) {
$this->assertInstanceOf('Composer\Downloader\TransportException', $e);
$this->assertEquals(404, $e->getCode());
$this->assertContains('404 Not Found', $e->getMessage());
}
}
public function testGetContents()