update-whitelist-with-dependencies.test 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --TEST--
  2. Update with a package whitelist only updates those packages and their dependencies listed as command arguments
  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", "version": "1.1.0", "require": { "dependency": "1.1.0" } },
  12. { "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
  13. { "name": "dependency", "version": "1.1.0" },
  14. { "name": "dependency", "version": "1.0.0" },
  15. { "name": "unrelated", "version": "1.1.0", "require": { "unrelated-dependency": "1.*" } },
  16. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  17. { "name": "unrelated-dependency", "version": "1.1.0" },
  18. { "name": "unrelated-dependency", "version": "1.0.0" }
  19. ]
  20. }
  21. ],
  22. "require": {
  23. "fixed": "1.*",
  24. "whitelisted": "1.*",
  25. "unrelated": "1.*"
  26. }
  27. }
  28. --INSTALLED--
  29. [
  30. { "name": "fixed", "version": "1.0.0" },
  31. { "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0" } },
  32. { "name": "dependency", "version": "1.0.0" },
  33. { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  34. { "name": "unrelated-dependency", "version": "1.0.0" }
  35. ]
  36. --RUN--
  37. update whitelisted --with-dependencies
  38. --EXPECT--
  39. Updating dependency (1.0.0) to dependency (1.1.0)
  40. Updating whitelisted (1.0.0) to whitelisted (1.1.0)