1
0
Fork 0

Add expected lock files to conflict with branch alias tests, add install from lock test

pull/9477/head
Nils Adermann 2020-11-16 13:27:54 +01:00
parent d19b858e20
commit 1b337be236
4 changed files with 123 additions and 1 deletions

View File

@ -27,6 +27,22 @@ and we don't want to modify branch alias meta data in the lock file.
}
--RUN--
update
--EXPECT-LOCK--
{
"packages": [
{ "name": "some/dep", "version": "dev-main", "type": "library", "extra": {"branch-alias": {"dev-main": "1.3.x-dev"} } }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"some/dep": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--EXPECT--
Installing some/dep (dev-main)
Marking some/dep (1.3.x-dev) as installed, alias of some/dep (dev-main)'
Marking some/dep (1.3.x-dev) as installed, alias of some/dep (dev-main)

View File

@ -0,0 +1,45 @@
--TEST--
Test that conflict on a branch alias is ignored if the alias is not required for installation.
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "some/dep", "version": "1.0.0" },
{ "name": "some/dep", "version": "1.1.0" },
{ "name": "some/dep", "version": "1.2.0" },
{ "name": "some/dep", "version": "dev-main", "extra": {"branch-alias": {"dev-main": "1.3.x-dev"} } },
{ "name": "some/dep", "version": "1.2.x-dev" },
{ "name": "conflictor/foo", "version": "1.0.0", "conflict": { "some/dep": ">=1.3" } }
]
}
],
"require": {
"some/dep": "dev-main",
"conflictor/foo": "1.0.0"
}
}
--RUN--
update
--EXPECT-LOCK--
{
"packages": [
{ "name": "conflictor/foo", "version": "1.0.0", "conflict": { "some/dep": ">=1.3" }, "type": "library" },
{ "name": "some/dep", "version": "dev-main", "extra": {"branch-alias": {"dev-main": "1.3.x-dev"} }, "type": "library" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"some/dep": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--EXPECT--
Installing conflictor/foo (1.0.0)
Installing some/dep (dev-main)
Marking some/dep (1.3.x-dev) as installed, alias of some/dep (dev-main)

View File

@ -0,0 +1,45 @@
--TEST--
Test that conflict on a branch alias is ignored if the alias is not required for installation.
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "some/dep", "version": "1.0.0" },
{ "name": "some/dep", "version": "1.1.0" },
{ "name": "some/dep", "version": "1.2.0" },
{ "name": "some/dep", "version": "dev-main", "extra": {"branch-alias": {"dev-main": "1.3.x-dev"} } },
{ "name": "some/dep", "version": "1.2.x-dev" },
{ "name": "conflictor/foo", "version": "1.0.0", "conflict": { "some/dep": ">=1.3" } }
]
}
],
"require": {
"some/dep": "dev-main",
"conflictor/foo": "1.0.0"
}
}
--LOCK--
{
"packages": [
{ "name": "conflictor/foo", "version": "1.0.0", "conflict": { "some/dep": ">=1.3" }, "type": "library" },
{ "name": "some/dep", "version": "dev-main", "extra": {"branch-alias": {"dev-main": "1.3.x-dev"} }, "type": "library" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"some/dep": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
install
--EXPECT--
Installing conflictor/foo (1.0.0)
Installing some/dep (dev-main)
Marking some/dep (1.3.x-dev) as installed, alias of some/dep (dev-main)

View File

@ -23,5 +23,21 @@ Test that conflict on a branch alias is respected
}
--RUN--
update
--EXPECT-LOCK--
{
"packages": [
{ "name": "some/dep", "version": "1.2.x-dev", "type": "library" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"some/dep": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--EXPECT--
Installing some/dep (1.2.x-dev)