replaced-packages-should-not-be-installed.test 630 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Requiring a replaced package in a version, that is not provided by the replacing package, should result in a conflict
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. { "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"} },
  10. { "name": "foo/replaced", "version": "1.0.0" },
  11. { "name": "foo/replaced", "version": "2.0.0" }
  12. ]
  13. }
  14. ],
  15. "require": {
  16. "foo/original": "1.0.0",
  17. "foo/replaced": "2.0.0"
  18. }
  19. }
  20. --RUN--
  21. install
  22. --EXPECT-EXIT-CODE--
  23. 2
  24. --EXPECT--