alias-with-reference.test 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --TEST--
  2. Aliases of referenced packages work
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/aliased", "version": "dev-master",
  11. "source": { "reference": "orig", "type": "git", "url": "" }
  12. },
  13. {
  14. "name": "b/requirer", "version": "1.0.0",
  15. "require": { "a/aliased": "1.0.0" },
  16. "source": { "reference": "1.0.0", "type": "git", "url": "" }
  17. }
  18. ]
  19. }
  20. ],
  21. "require": {
  22. "a/aliased": "dev-master#abcd as 1.0.0",
  23. "b/requirer": "*"
  24. }
  25. }
  26. --RUN--
  27. update
  28. --EXPECT-LOCK--
  29. {
  30. "packages": [
  31. {
  32. "name": "a/aliased", "version": "dev-master",
  33. "source": { "reference": "abcd", "type": "git", "url": "" },
  34. "type": "library"
  35. },
  36. {
  37. "name": "b/requirer", "version": "1.0.0",
  38. "require": { "a/aliased": "1.0.0" },
  39. "source": { "reference": "1.0.0", "type": "git", "url": "" },
  40. "type": "library"
  41. }
  42. ],
  43. "packages-dev": [],
  44. "aliases": [{
  45. "package": "a/aliased",
  46. "version": "dev-master",
  47. "alias": "1.0.0",
  48. "alias_normalized": "1.0.0.0"
  49. }],
  50. "minimum-stability": "stable",
  51. "stability-flags": {
  52. "a/aliased": 20
  53. },
  54. "prefer-stable": false,
  55. "prefer-lowest": false,
  56. "platform": [],
  57. "platform-dev": []
  58. }
  59. --EXPECT--
  60. Installing a/aliased (dev-master abcd)
  61. Marking a/aliased (1.0.0) as installed, alias of a/aliased (dev-master abcd)
  62. Marking a/aliased (9999999-dev abcd) as installed, alias of a/aliased (dev-master abcd)
  63. Installing b/requirer (1.0.0)