update-whitelist-patterns-with-all-dependencies.test 2.1 KB

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