1
0
Fork 0

PoolBuilderTest: Add case for multiple repositories and partial update with replace

pull/8850/head
Nils Adermann 2020-09-01 12:07:12 +02:00
parent 6c4ed247dd
commit 976fcd2eb4
2 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,107 @@
--TEST--
Check that replacers from additional repositories are loaded when doing a partial update
--REQUEST--
{
"require": {
"base/package": "^1.0",
"indirect/replacer": "^1.0"
},
"locked": [
{"name": "shared/dep", "version": "1.2.0", "id": 1},
{"name": "indirect/replacer", "version": "1.2.0", "require": {"replacer/package": "^1.2"}, "id": 2},
{"name": "replacer/package", "version": "1.2.0", "require": {"shared/dep": "^1.1"}, "replace": {"base/package": "1.2.0"}, "id": 3}
],
"allowList": [
"indirect/replacer"
],
"allowTransitiveDepsNoRootRequire": true
}
--FIXED--
[
]
--PACKAGE-REPOS--
[
[
{
"name": "base/package",
"version": "1.0.0",
"require": {
"shared/dep": "^1.2"
}
},
{
"name": "shared/dep",
"version": "1.0.0"
},
{
"name": "shared/dep",
"version": "1.2.0"
}
],
[
{
"name": "base/package",
"version": "1.1.0"
},
{
"name": "shared/dep",
"version": "1.3.0"
}
],
{
"canonical": false,
"packages": [
{
"name": "indirect/replacer",
"version": "1.2.0",
"require": {
"replacer/package": "^1.2"
}
},
{
"name": "replacer/package",
"version": "1.2.0",
"require": {
"shared/dep": "^1.1"
}
},
{
"name": "shared/dep",
"version": "1.1.0"
}
]
},
[
{
"name": "replacer/package",
"version": "1.0.0",
"require": {
"shared/dep": "^1.0"
},
"replace": {
"base/package": "1.0.0"
}
},
{
"name": "indirect/replacer",
"version": "1.0.0",
"require": {
"replacer/package": "^1.0"
}
}
]
]
--EXPECT--
[
"indirect/replacer-1.2.0.0",
"indirect/replacer-1.0.0.0",
"replacer/package-1.2.0.0",
"replacer/package-1.0.0.0",
"base/package-1.0.0.0",
"shared/dep-1.0.0.0",
"shared/dep-1.2.0.0"
]

View File

@ -71,6 +71,9 @@ Check that replacers from additional repositories are loaded
"version": "1.0.0",
"require": {
"shared/dep": "^1.0"
},
"replace": {
"base/package": "1.2.0"
}
},
{