1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add test covering replacer unfixing

This commit is contained in:
Jordi Boggiano 2020-06-06 15:19:55 +02:00
parent f2befc46c9
commit b7f1550896
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
3 changed files with 61 additions and 6 deletions

View file

@ -113,11 +113,16 @@ class PoolBuilderTest extends TestCase
return $id;
}
if ($package instanceof AliasPackage && $id = array_search($package->getAliasOf(), $packageIds, true)) {
return (string) $package->getName().'-'.$package->getVersion() .' alias of '.$id;
$suffix = '';
if ($package->getRepository() instanceof LockArrayRepository) {
$suffix = ' (locked)';
}
return (string) $package;
if ($package instanceof AliasPackage && $id = array_search($package->getAliasOf(), $packageIds, true)) {
return (string) $package->getName().'-'.$package->getVersion() .' alias of '.$id . $suffix;
}
return (string) $package . $suffix;
}, $result);
$this->assertSame($expect, $result);