1
0
Fork 0

Added more poolbuilder test

pull/8850/head
Yanick Witschi 2020-04-30 17:19:21 +02:00 committed by Jordi Boggiano
parent d78c37edd2
commit b87fc5bbfd
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
3 changed files with 57 additions and 1 deletions

View File

@ -272,7 +272,8 @@ class PoolBuilder
// Make sure we empty the packagesToLoad here as it would result // Make sure we empty the packagesToLoad here as it would result
// in an endless loop with non-existent packages for example // in an endless loop with non-existent packages for example
$this->packagesToLoad = array(); // TODO: fixme, this should only happen if it's not a new package
// $this->packagesToLoad = array();
} }
private function loadPackage(Request $request, PackageInterface $package, $propagateUpdate = true) private function loadPackage(Request $request, PackageInterface $package, $propagateUpdate = true)

View File

@ -0,0 +1,29 @@
--TEST--
Test irrelevant package versions are not loaded
--REQUEST--
{
"require": {
"root/req": "*"
}
}
--FIXED--
[
]
--PACKAGES--
[
{"name": "root/req", "version": "1.0.0", "require": {"dep/dep": "2.*"}},
{"name": "dep/dep", "version": "2.3.4", "require": {"dep/dep2": "2.*"}},
{"name": "dep/dep", "version": "3.0.1"},
{"name": "dep/dep2", "version": "2.3.4"},
{"name": "dep/dep2", "version": "3.0.1"}
]
--EXPECT--
[
"root/req-1.0.0.0",
"dep/dep-2.3.4.0",
"dep/dep2-2.3.4.0"
]

View File

@ -0,0 +1,26 @@
--TEST--
Test irrelevant package versions are not loaded
--REQUEST--
{
"require": {
"root/req": "*"
}
}
--FIXED--
[
]
--PACKAGES--
[
{"name": "root/req", "version": "1.0.0", "require": {"dep/dep": "2.*"}},
{"name": "dep/dep", "version": "2.3.4"},
{"name": "dep/dep", "version": "3.0.1"}
]
--EXPECT--
[
"root/req-1.0.0.0",
"dep/dep-2.3.4.0"
]