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

Fail over from source to dist and vice versa when downloads fail

Any RuntimeException descendent will be caught and cause another
download attempt using either source or dist depending on what was
attempted first.
This commit is contained in:
Nils Adermann 2014-02-24 18:40:33 +01:00
parent aa74818fe0
commit 5ed18d9aa2
5 changed files with 123 additions and 35 deletions

View file

@ -47,7 +47,8 @@ class ComposerTest extends TestCase
public function testSetGetDownloadManager()
{
$composer = new Composer();
$manager = $this->getMock('Composer\Downloader\DownloadManager');
$io = $this->getMock('Composer\IO\IOInterface');
$manager = $this->getMock('Composer\Downloader\DownloadManager', array(), array($io));
$composer->setDownloadManager($manager);
$this->assertSame($manager, $composer->getDownloadManager());