1
0
Fork 0

Adjust test suite

pull/2766/head
Jordi Boggiano 2014-02-26 16:01:31 +01:00
parent 28bb781324
commit 5067d76dbc
1 changed files with 2 additions and 9 deletions

View File

@ -130,18 +130,11 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
$this->assertAttributeEquals(50, 'lastProgress', $fs);
}
public function testCallbackGetNotifyFailure404()
public function testCallbackGetPassesThrough404()
{
$fs = new RemoteFilesystem($this->getMock('Composer\IO\IOInterface'));
try {
$this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, 'HTTP/1.1 404 Not Found', 404, 0, 0);
$this->fail();
} catch (\Exception $e) {
$this->assertInstanceOf('Composer\Downloader\TransportException', $e);
$this->assertEquals(404, $e->getCode());
$this->assertContains('HTTP/1.1 404 Not Found', $e->getMessage());
}
$this->assertNull($this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, 'HTTP/1.1 404 Not Found', 404, 0, 0));
}
public function testCaptureAuthenticationParamsFromUrl()