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

Fix implementation & tweak test

This commit is contained in:
Jordi Boggiano 2021-11-12 23:25:06 +01:00
parent b8caf4b214
commit 4352f23962
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
4 changed files with 60 additions and 24 deletions

View file

@ -140,6 +140,8 @@ class PoolBuilderTest extends TestCase
$optimizer = new PoolOptimizer(new DefaultPolicy());
$result = $this->getPackageResultSet($optimizer->optimize($request, $pool), $packageIds);
$this->assertSame($expectOptimized, $result, 'Optimized pool does not match expected package set');
chdir($oldCwd);
}
/**
@ -153,8 +155,6 @@ class PoolBuilderTest extends TestCase
$result[] = $pool->packageById($i);
}
chdir($oldCwd);
return array_map(function (BasePackage $package) use ($packageIds) {
if ($id = array_search($package, $packageIds, true)) {
return $id;