update-alias-lock.test 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --TEST--
  2. Update aliased package does not mess up the lock file
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/a", "version": "dev-master",
  11. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  12. "source": { "reference": "master", "type": "git", "url": "" }
  13. }
  14. ]
  15. },
  16. {
  17. "type": "package",
  18. "package": [
  19. {
  20. "name": "a/a", "version": "dev-master",
  21. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  22. "source": { "reference": "lowpriomaster", "type": "git", "url": "" }
  23. }
  24. ]
  25. }
  26. ],
  27. "require": {
  28. "a/a": "1.*"
  29. },
  30. "minimum-stability": "dev"
  31. }
  32. --INSTALLED--
  33. [
  34. {
  35. "name": "a/a", "version": "dev-master",
  36. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  37. "source": { "reference": "1234", "type": "git", "url": "" }
  38. }
  39. ]
  40. --RUN--
  41. update
  42. --EXPECT-LOCK--
  43. {
  44. "packages": [
  45. {
  46. "name": "a/a", "version": "dev-master",
  47. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  48. "source": { "reference": "master", "type": "git", "url": "" },
  49. "type": "library"
  50. }
  51. ],
  52. "packages-dev": [],
  53. "aliases": [],
  54. "minimum-stability": "dev",
  55. "stability-flags": [],
  56. "prefer-stable": false,
  57. "prefer-lowest": false,
  58. "platform": [],
  59. "platform-dev": []
  60. }
  61. --EXPECT--
  62. Upgrading a/a (dev-master 1234 => dev-master master)