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

Refactor ComposerRepository to work with combined repos having lazy providers and partial packages

This commit is contained in:
Jordi Boggiano 2018-12-04 17:03:56 +01:00
parent 14d6bcedda
commit b47330adf1
4 changed files with 296 additions and 267 deletions

View file

@ -153,7 +153,9 @@ class ComposerRepositoryTest extends TestCase
),
));
$packages = $repo->whatProvides('a', false, array($this, 'isPackageAcceptableReturnTrue'));
$reflMethod = new \ReflectionMethod($repo, 'whatProvides');
$reflMethod->setAccessible(true);
$packages = $reflMethod->invoke($repo, 'a', array($this, 'isPackageAcceptableReturnTrue'));
$this->assertCount(7, $packages);
$this->assertEquals(array('1', '1-alias', '2', '2-alias', '2-root', '3', '3-root'), array_keys($packages));