update-allow-list.test 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --TEST--
  2. Update with a package whitelist only updates those packages listed as command arguments
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "fixed/pkg", "version": "1.1.0" },
  10. { "name": "fixed/pkg", "version": "1.0.0" },
  11. { "name": "whitelisted/pkg", "version": "1.1.0", "require": { "dependency/pkg": "1.*" } },
  12. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.*" } },
  13. { "name": "dependency/pkg", "version": "1.1.0" },
  14. { "name": "dependency/pkg", "version": "1.0.0" },
  15. { "name": "unrelated/pkg", "version": "1.1.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  16. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  17. { "name": "unrelated/pkg-dependency", "version": "1.1.0" },
  18. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  19. ]
  20. }
  21. ],
  22. "require": {
  23. "fixed/pkg": "1.*",
  24. "whitelisted/pkg": "1.*",
  25. "unrelated/pkg": "1.*"
  26. }
  27. }
  28. --INSTALLED--
  29. [
  30. { "name": "fixed/pkg", "version": "1.0.0" },
  31. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "dependency": "1.*" } },
  32. { "name": "dependency/pkg", "version": "1.0.0" },
  33. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } },
  34. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  35. ]
  36. --LOCK--
  37. {
  38. "packages": [
  39. { "name": "fixed/pkg", "version": "1.0.0" },
  40. { "name": "whitelisted/pkg", "version": "1.0.0", "require": { "dependency/pkg": "1.*" } },
  41. { "name": "dependency/pkg", "version": "1.0.0" },
  42. { "name": "unrelated/pkg", "version": "1.0.0", "require": { "unrelated/pkg-dependency": "1.*" } },
  43. { "name": "unrelated/pkg-dependency", "version": "1.0.0" }
  44. ],
  45. "packages-dev": [],
  46. "aliases": [],
  47. "minimum-stability": "dev",
  48. "stability-flags": [],
  49. "prefer-stable": false,
  50. "prefer-lowest": false,
  51. "platform": [],
  52. "platform-dev": []
  53. }
  54. --RUN--
  55. update whitelisted/pkg
  56. --EXPECT--
  57. Upgrading whitelisted/pkg (1.0.0 => 1.1.0)