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

Overhaul VcsDrivers, introduce TransportException for remote filesystem errors

This commit is contained in:
Jordi Boggiano 2012-03-08 21:59:02 +01:00
parent 53ab5011f0
commit 3e22084ea4
11 changed files with 73 additions and 117 deletions

View file

@ -111,7 +111,7 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
$this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, '', 404, 0, 0);
$this->fail();
} catch (\Exception $e) {
$this->assertInstanceOf('RuntimeException', $e);
$this->assertInstanceOf('Composer\Downloader\TransportException', $e);
$this->assertContains('URL not found', $e->getMessage());
}
}
@ -137,7 +137,7 @@ class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
$this->callCallbackGet($fs, STREAM_NOTIFY_FAILURE, 0, '', 404, 0, 0);
$this->fail();
} catch (\Exception $e) {
$this->assertInstanceOf('RuntimeException', $e);
$this->assertInstanceOf('Composer\Downloader\TransportException', $e);
$this->assertContains('URL required authentication', $e->getMessage());
$this->assertAttributeEquals(false, 'firstCall', $fs);
}