mirror of
https://github.com/composer/composer
synced 2025-05-08 16:17:37 +00:00
Make sure aliased packages are removed correctly from the repository, fixes #7167
This commit is contained in:
parent
8d06832077
commit
036fc44c25
2 changed files with 12 additions and 1 deletions
|
@ -68,7 +68,7 @@ class ArrayRepositoryTest extends TestCase
|
|||
$this->assertEquals('bar', $bar[0]->getName());
|
||||
}
|
||||
|
||||
public function testAutomaticallyAddAliasedPackage()
|
||||
public function testAutomaticallyAddAndRemoveAliasedPackage()
|
||||
{
|
||||
$repo = new ArrayRepository();
|
||||
|
||||
|
@ -80,6 +80,10 @@ class ArrayRepositoryTest extends TestCase
|
|||
$this->assertCount(2, $repo);
|
||||
$this->assertTrue($repo->hasPackage($this->getPackage('foo', '1')));
|
||||
$this->assertTrue($repo->hasPackage($this->getPackage('foo', '2')));
|
||||
|
||||
$repo->removePackage($alias);
|
||||
|
||||
$this->assertCount(0, $repo);
|
||||
}
|
||||
|
||||
public function testSearch()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue