1
0
Fork 0

added tests to reproduce the bug

pull/3746/head
Matthias Derer 2015-02-16 13:46:59 +01:00
parent 781d8cb925
commit 1425bb7fc3
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,39 @@
--TEST--
Requiring a replaced package in a version, that is not provided by the replacing package, should result in a conflict, when installing from lock
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"} },
{ "name": "foo/replaced", "version": "1.0.0" },
{ "name": "foo/replaced", "version": "2.0.0" }
]
}
],
"require": {
"foo/original": "1.0.0",
"foo/replaced": "2.0.0"
}
}
--LOCK--
{
"packages": [
{ "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"} },
{ "name": "foo/replaced", "version": "2.0.0" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
install
--EXPECT-EXIT-CODE--
2
--EXPECT--

View File

@ -0,0 +1,24 @@
--TEST--
Requiring a replaced package in a version, that is not provided by the replacing package, should result in a conflict
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"} },
{ "name": "foo/replaced", "version": "1.0.0" },
{ "name": "foo/replaced", "version": "2.0.0" }
]
}
],
"require": {
"foo/original": "1.0.0",
"foo/replaced": "2.0.0"
}
}
--RUN--
install
--EXPECT-EXIT-CODE--
2
--EXPECT--