mirror of
https://github.com/composer/composer
synced 2025-05-08 16:17:37 +00:00
Add options to configure repository priorities
This commit is contained in:
parent
59c831c2f8
commit
b6bad4eef6
11 changed files with 455 additions and 5 deletions
|
@ -108,4 +108,20 @@ class RepositoryManagerTest extends TestCase
|
|||
|
||||
return $cases;
|
||||
}
|
||||
|
||||
public function testFilterRepoWrapping()
|
||||
{
|
||||
$rm = new RepositoryManager(
|
||||
$this->getMockBuilder('Composer\IO\IOInterface')->getMock(),
|
||||
$config = $this->getMockBuilder('Composer\Config')->setMethods(array('get'))->getMock(),
|
||||
$this->getMockBuilder('Composer\Util\HttpDownloader')->disableOriginalConstructor()->getMock(),
|
||||
$this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock()
|
||||
);
|
||||
|
||||
$rm->setRepositoryClass('path', 'Composer\Repository\PathRepository');
|
||||
$repo = $rm->createRepository('path', array('type' => 'path', 'url' => __DIR__, 'only' => array('foo/bar')));
|
||||
|
||||
$this->assertInstanceOf('Composer\Repository\FilterRepository', $repo);
|
||||
$this->assertInstanceOf('Composer\Repository\PathRepository', $repo->getRepository());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue