updating-dev-updates-url-and-reference.test 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. --TEST--
  2. Updating a dev package for new reference updates the url and reference
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/a", "version": "dev-master",
  11. "source": { "reference": "newref", "url": "newurl", "type": "git" },
  12. "dist": { "reference": "newref", "url": "newurl", "type": "zip", "shasum": "" }
  13. }
  14. ]
  15. }
  16. ],
  17. "minimum-stability": "dev",
  18. "require": {
  19. "a/a": "dev-master"
  20. }
  21. }
  22. --LOCK--
  23. {
  24. "packages": [
  25. {
  26. "name": "a/a", "version": "dev-master",
  27. "source": { "reference": "oldref", "url": "oldurl", "type": "git" },
  28. "dist": { "reference": "oldref", "url": "oldurl", "type": "zip", "shasum": "" }
  29. }
  30. ],
  31. "packages-dev": [],
  32. "aliases": [],
  33. "minimum-stability": "dev",
  34. "stability-flags": {"a/a":20},
  35. "prefer-stable": false,
  36. "prefer-lowest": false
  37. }
  38. --INSTALLED--
  39. [
  40. {
  41. "name": "a/a", "version": "dev-master",
  42. "source": { "reference": "oldref", "url": "oldurl", "type": "git" },
  43. "dist": { "reference": "oldref", "url": "oldurl", "type": "zip", "shasum": "" }
  44. }
  45. ]
  46. --RUN--
  47. update
  48. --EXPECT-LOCK--
  49. {
  50. "packages": [
  51. {
  52. "name": "a/a", "version": "dev-master",
  53. "type": "library",
  54. "source": { "reference": "newref", "url": "newurl", "type": "git" },
  55. "dist": { "reference": "newref", "url": "newurl", "type": "zip", "shasum": "" }
  56. }
  57. ],
  58. "packages-dev": [],
  59. "aliases": [],
  60. "minimum-stability": "dev",
  61. "stability-flags": {"a/a":20},
  62. "prefer-stable": false,
  63. "prefer-lowest": false,
  64. "platform": [],
  65. "platform-dev": []
  66. }
  67. --EXPECT--
  68. Upgrading a/a (dev-master oldref => dev-master newref)