1
0
Fork 0
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:
Martin Hasoň 2013-04-01 08:10:15 +02:00
parent c39e958a6f
commit 753a8345cb
14 changed files with 120 additions and 119 deletions

View file

@ -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')));
}
}