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

Add PEAR channel reader & Update PearRepository to use it.

This commit is contained in:
Alexey Prilipko 2012-06-09 16:48:52 +11:00
parent ee2834a169
commit e173f11b37
29 changed files with 1970 additions and 342 deletions

View file

@ -13,6 +13,7 @@
namespace Composer\Test\Mock;
use Composer\Util\RemoteFilesystem;
use Composer\Downloader\TransportException;
/**
* Remote filesystem mock
@ -29,10 +30,11 @@ class RemoteFilesystemMock extends RemoteFilesystem
public function getContents($originUrl, $fileUrl, $progress = true)
{
if(!empty($this->contentMap[$fileUrl]))
if (!empty($this->contentMap[$fileUrl])) {
return $this->contentMap[$fileUrl];
}
throw new \Composer\Downloader\TransportException('The "'.$fileUrl.'" file could not be downloaded (NOT FOUND)', 404);
throw new TransportException('The "'.$fileUrl.'" file could not be downloaded (NOT FOUND)', 404);
}
}