1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Fix tests

This commit is contained in:
Jordi Boggiano 2018-11-16 14:43:25 +01:00
parent 9986b797fb
commit 64384f8b15
4 changed files with 64 additions and 28 deletions

View file

@ -143,25 +143,6 @@ class RemoteFilesystemTest extends 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->getMockBuilder('Composer\IO\IOInterface')->getMock();
$io->expects($this->once())
->method('setAuthentication')
->with($this->equalTo('github.com'), $this->equalTo('user'), $this->equalTo('pass'));
$fs = new RemoteFilesystem($io, $this->getConfigMock());
try {
$fs->getContents('github.com', 'https://user:pass@github.com/composer/composer/404');
} catch (\Exception $e) {
$this->assertInstanceOf('Composer\Downloader\TransportException', $e);
$this->assertNotEquals(200, $e->getCode());
}
}
public function testGetContents()
{
$fs = new RemoteFilesystem($this->getMockBuilder('Composer\IO\IOInterface')->getMock(), $this->getConfigMock());