mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Add test case for RepositoryManager::prependRepository method
This commit is contained in:
parent
ea30392105
commit
f47c2c9ed7
1 changed files with 16 additions and 0 deletions
|
@ -32,6 +32,22 @@ class RepositoryManagerTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testPrepend()
|
||||
{
|
||||
$rm = new RepositoryManager(
|
||||
$this->getMock('Composer\IO\IOInterface'),
|
||||
$this->getMock('Composer\Config'),
|
||||
$this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock()
|
||||
);
|
||||
|
||||
$repository1 = $this->getMock('Composer\Repository\RepositoryInterface');
|
||||
$repository2 = $this->getMock('Composer\Repository\RepositoryInterface');
|
||||
$rm->addRepository($repository1);
|
||||
$rm->prependRepository($repository2);
|
||||
|
||||
$this->assertEquals(array($repository2, $repository1), $rm->getRepositories());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider creationCases
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue