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:
parent
b8caf4b214
commit
4352f23962
4 changed files with 60 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue