partial-update-without-lock.test 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Partial update without lock file should error
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "a/old", "version": "1.0.0" },
  10. { "name": "a/old", "version": "2.0.0" },
  11. { "name": "b/unstable", "version": "1.0.0" },
  12. { "name": "b/unstable", "version": "1.1.0-alpha" },
  13. { "name": "c/uptodate", "version": "1.0.0" },
  14. { "name": "d/removed", "version": "1.0.0" }
  15. ]
  16. }
  17. ],
  18. "require": {
  19. "a/old": "*",
  20. "b/unstable": "*",
  21. "c/uptodate": "*"
  22. }
  23. }
  24. --INSTALLED--
  25. [
  26. { "name": "a/old", "version": "1.0.0" },
  27. { "name": "b/unstable", "version": "1.1.0-alpha" },
  28. { "name": "c/uptodate", "version": "1.0.0" },
  29. { "name": "d/removed", "version": "1.0.0" }
  30. ]
  31. --RUN--
  32. update b/unstable
  33. --EXPECT-OUTPUT--
  34. Cannot update only a partial set of packages without a lock file present.
  35. --EXPECT-EXIT-CODE--
  36. 1
  37. --EXPECT--