aliased-priority.test 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --TEST--
  2. Aliases take precedence over default package
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/c", "version": "dev-feature-foo",
  11. "source": { "reference": "feat.f", "type": "git", "url": "" }
  12. },
  13. {
  14. "name": "a/b", "version": "dev-master",
  15. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  16. "source": { "reference": "forked", "type": "git", "url": "" }
  17. }
  18. ]
  19. },
  20. {
  21. "type": "package",
  22. "package": [
  23. {
  24. "name": "a/a", "version": "dev-master",
  25. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  26. "source": { "reference": "master", "type": "git", "url": "" },
  27. "require": {
  28. "a/b": "dev-master",
  29. "a/c": "dev-master"
  30. }
  31. },
  32. {
  33. "name": "a/b", "version": "dev-master",
  34. "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } },
  35. "source": { "reference": "master", "type": "git", "url": "" }
  36. },
  37. { "name": "a/c", "version": "dev-master" }
  38. ]
  39. }
  40. ],
  41. "require": {
  42. "a/a": "1.*",
  43. "a/b": "1.*",
  44. "a/c": "dev-feature-foo as dev-master"
  45. },
  46. "minimum-stability": "dev"
  47. }
  48. --RUN--
  49. install
  50. --EXPECT--
  51. Installing a/c (dev-feature-foo feat.f)
  52. Marking a/c (dev-master feat.f) as installed, alias of a/c (dev-feature-foo feat.f)
  53. Installing a/b (dev-master forked)
  54. Marking a/b (1.0.x-dev forked) as installed, alias of a/b (dev-master forked)
  55. Installing a/a (dev-master master)
  56. Marking a/a (1.0.x-dev master) as installed, alias of a/a (dev-master master)