mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
fix when composite repo has no delegates
This commit is contained in:
parent
52990eca1e
commit
fa4b13d95a
2 changed files with 21 additions and 3 deletions
|
@ -125,4 +125,22 @@ class CompositeRepositoryTest extends TestCase
|
|||
|
||||
$this->assertEquals(2, count($repo), "Should return '2' for count(\$repo)");
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideMethodCalls
|
||||
*/
|
||||
public function testNoRepositories($method, $args)
|
||||
{
|
||||
$repo = new CompositeRepository(array());
|
||||
call_user_func_array(array($repo, $method), $args);
|
||||
}
|
||||
|
||||
public function provideMethodCalls()
|
||||
{
|
||||
return array(
|
||||
array('findPackages', array('foo')),
|
||||
array('search', array('foo')),
|
||||
array('getPackages', array()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue