1
0
Fork 0
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:
Jordi Boggiano 2020-04-09 13:39:06 +02:00
parent 59c831c2f8
commit b6bad4eef6
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
11 changed files with 455 additions and 5 deletions

View file

@ -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());
}
}