update-whitelist-patterns-with-root-dependencies.test 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --TEST--
  2. Update with a package whitelist only updates those packages and their dependencies matching the pattern
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "fixed", "version": "1.1.0" },
  10. { "name": "fixed", "version": "1.0.0" },
  11. { "name": "whitelisted-component1", "version": "1.1.0", "require": { "whitelisted-component2": "1.1.0" } },
  12. { "name": "whitelisted-component1", "version": "1.0.0", "require": { "whitelisted-component2": "1.0.0" } },
  13. { "name": "whitelisted-component2", "version": "1.1.0", "require": { "dependency": "1.1.0", "whitelisted-component5": "1.0.0" } },
  14. { "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
  15. { "name": "whitelisted-component3", "version": "1.1.0", "require": { "whitelisted-component4": "1.1.0" } },
  16. { "name": "whitelisted-component3", "version": "1.0.0", "require": { "whitelisted-component4": "1.0.0" } },
  17. { "name": "whitelisted-component4", "version": "1.1.0" },
  18. { "name": "whitelisted-component4", "version": "1.0.0" },
  19. { "name": "whitelisted-component5", "version": "1.1.0" },
  20. { "name": "whitelisted-component5", "version": "1.0.0" },
  21. { "name": "dependency", "version": "1.1.0" },
  22. { "name": "dependency", "version": "1.0.0" },
  23. { "name": "unrelated", "version": "1.1.0", "require": { "unrelated-dependency": "1.*" } },
  24. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  25. { "name": "unrelated-dependency", "version": "1.1.0" },
  26. { "name": "unrelated-dependency", "version": "1.0.0" }
  27. ]
  28. }
  29. ],
  30. "require": {
  31. "fixed": "1.*",
  32. "whitelisted-component1": "1.*",
  33. "whitelisted-component2": "1.*",
  34. "whitelisted-component3": "1.0.0",
  35. "unrelated": "1.*"
  36. }
  37. }
  38. --INSTALLED--
  39. [
  40. { "name": "fixed", "version": "1.0.0" },
  41. { "name": "whitelisted-component1", "version": "1.0.0", "require": { "whitelisted-component2": "1.0.0" } },
  42. { "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
  43. { "name": "whitelisted-component3", "version": "1.0.0", "require": { "whitelisted-component4": "1.0.0" } },
  44. { "name": "whitelisted-component4", "version": "1.0.0" },
  45. { "name": "whitelisted-component5", "version": "1.0.0" },
  46. { "name": "dependency", "version": "1.0.0" },
  47. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  48. { "name": "unrelated-dependency", "version": "1.0.0" }
  49. ]
  50. --RUN--
  51. update whitelisted-* --with-dependencies
  52. --EXPECT--
  53. Updating dependency (1.0.0) to dependency (1.1.0)
  54. Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)
  55. Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)