mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Added support for the alias of an aliased package
This commit is contained in:
parent
c39e958a6f
commit
753a8345cb
14 changed files with 120 additions and 119 deletions
|
@ -66,4 +66,18 @@ class ArrayRepositoryTest extends TestCase
|
|||
$this->assertCount(2, $bar);
|
||||
$this->assertEquals('bar', $bar[0]->getName());
|
||||
}
|
||||
|
||||
public function testAutomaticallyAddAliasedPackage()
|
||||
{
|
||||
$repo = new ArrayRepository();
|
||||
|
||||
$package = $this->getPackage('foo', '1');
|
||||
$alias = $this->getAliasPackage($package, '2');
|
||||
|
||||
$repo->addPackage($alias);
|
||||
|
||||
$this->assertEquals(2, count($repo));
|
||||
$this->assertTrue($repo->hasPackage($this->getPackage('foo', '1')));
|
||||
$this->assertTrue($repo->hasPackage($this->getPackage('foo', '2')));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue