mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Add test to verify url and and hash are updated, fixes #1460
This commit is contained in:
parent
b34220edc8
commit
c31f4be112
1 changed files with 62 additions and 0 deletions
|
@ -0,0 +1,62 @@
|
||||||
|
--TEST--
|
||||||
|
Updating a dev package for new reference updates the url and reference
|
||||||
|
--COMPOSER--
|
||||||
|
{
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "package",
|
||||||
|
"package": [
|
||||||
|
{
|
||||||
|
"name": "a/a", "version": "dev-master",
|
||||||
|
"source": { "reference": "newref", "url": "newurl", "type": "git" },
|
||||||
|
"dist": { "reference": "newref", "url": "newurl", "type": "zip", "shasum": "" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"require": {
|
||||||
|
"a/a": "dev-master"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--LOCK--
|
||||||
|
{
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "a/a", "version": "dev-master",
|
||||||
|
"source": { "reference": "oldref", "url": "oldurl", "type": "git" },
|
||||||
|
"dist": { "reference": "oldref", "url": "oldurl", "type": "zip", "shasum": "" }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": null,
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"stability-flags": {"a/a":20}
|
||||||
|
}
|
||||||
|
--INSTALLED--
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "a/a", "version": "dev-master",
|
||||||
|
"source": { "reference": "oldref", "url": "oldurl", "type": "git" },
|
||||||
|
"dist": { "reference": "oldref", "url": "oldurl", "type": "zip", "shasum": "" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
--RUN--
|
||||||
|
update
|
||||||
|
--EXPECT-LOCK--
|
||||||
|
{
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "a/a", "version": "dev-master",
|
||||||
|
"type": "library",
|
||||||
|
"source": { "reference": "newref", "url": "newurl", "type": "git" },
|
||||||
|
"dist": { "reference": "newref", "url": "newurl", "type": "zip", "shasum": "" }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": null,
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"stability-flags": {"a/a":20}
|
||||||
|
}
|
||||||
|
--EXPECT--
|
||||||
|
Updating a/a (dev-master oldref) to a/a (dev-master newref)
|
Loading…
Add table
Add a link
Reference in a new issue