update-whitelist-patterns-without-dependencies.test 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --TEST--
  2. Update with a package whitelist only updates those packages 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. "unrelated": "1.*"
  29. }
  30. }
  31. --INSTALLED--
  32. [
  33. { "name": "fixed", "version": "1.0.0" },
  34. { "name": "whitelisted-component1", "version": "1.0.0" },
  35. { "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
  36. { "name": "dependency", "version": "1.0.0" },
  37. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  38. { "name": "unrelated-dependency", "version": "1.0.0" }
  39. ]
  40. --RUN--
  41. update whitelisted-*
  42. --EXPECT--
  43. Updating whitelisted-component1 (1.0.0) to whitelisted-component1 (1.1.0)
  44. Updating whitelisted-component2 (1.0.0) to whitelisted-component2 (1.1.0)