update-whitelist-patterns-with-dependencies.test 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --TEST--
  2. Update with a package whitelist only updates those packages and their dependencies matching the pattern but no dependencies defined as roo package
  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" },
  12. { "name": "whitelisted-component1", "version": "1.0.0" },
  13. { "name": "whitelisted-component2", "version": "1.1.0", "require": { "dependency": "1.*", "root-dependency": "1.*" } },
  14. { "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.*", "root-dependency": "1.*" } },
  15. { "name": "dependency", "version": "1.1.0" },
  16. { "name": "dependency", "version": "1.0.0" },
  17. { "name": "root-dependency", "version": "1.1.0" },
  18. { "name": "root-dependency", "version": "1.0.0" },
  19. { "name": "unrelated", "version": "1.1.0", "require": { "unrelated-dependency": "1.*" } },
  20. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  21. { "name": "unrelated-dependency", "version": "1.1.0" },
  22. { "name": "unrelated-dependency", "version": "1.0.0" }
  23. ]
  24. }
  25. ],
  26. "require": {
  27. "fixed": "1.*",
  28. "whitelisted-component1": "1.*",
  29. "whitelisted-component2": "1.*",
  30. "root-dependency": "1.*",
  31. "unrelated": "1.*"
  32. }
  33. }
  34. --INSTALLED--
  35. [
  36. { "name": "fixed", "version": "1.0.0" },
  37. { "name": "whitelisted-component1", "version": "1.0.0" },
  38. { "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
  39. { "name": "root-dependency", "version": "1.0.0" },
  40. { "name": "dependency", "version": "1.0.0" },
  41. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  42. { "name": "unrelated-dependency", "version": "1.0.0" }
  43. ]
  44. --RUN--
  45. update whitelisted-* --with-dependencies
  46. --EXPECT--
  47. Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)
  48. Updating dependency (1.0.0) to dependency (1.1.0)
  49. Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)