update-downgrades-unstable-packages.test 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --TEST--
  2. Downgrading from unstable to more stable package should work even if already installed
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {
  10. "name": "a/a", "version": "dev-master",
  11. "source": { "reference": "abcd", "url": "", "type": "git" }
  12. },
  13. {
  14. "name": "a/a", "version": "1.0.0",
  15. "source": { "reference": "1.0.0", "url": "", "type": "git" },
  16. "dist": { "reference": "1.0.0", "url": "", "type": "zip", "shasum": "" }
  17. },
  18. {
  19. "name": "b/b", "version": "dev-master",
  20. "source": { "reference": "abcd", "url": "", "type": "git" }
  21. },
  22. {
  23. "name": "b/b", "version": "1.0.0",
  24. "source": { "reference": "1.0.0", "url": "", "type": "git" },
  25. "dist": { "reference": "1.0.0", "url": "", "type": "zip", "shasum": "" }
  26. }
  27. ]
  28. }
  29. ],
  30. "require": {
  31. "a/a": "*",
  32. "b/b": "*@dev"
  33. }
  34. }
  35. --INSTALLED--
  36. [
  37. {
  38. "name": "a/a", "version": "dev-master",
  39. "source": { "reference": "abcd", "url": "", "type": "git" }
  40. },
  41. {
  42. "name": "b/b", "version": "dev-master",
  43. "source": { "reference": "abcd", "url": "", "type": "git" }
  44. }
  45. ]
  46. --RUN--
  47. update
  48. --EXPECT--
  49. Marking a/a (9999999-dev abcd) as uninstalled, alias of a/a (dev-master abcd)
  50. Downgrading a/a (dev-master abcd => 1.0.0)