provider-dev-require-can-satisfy-require.test 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --TEST--
  2. Test that a requirement can be satisfied by a providing package required in require-dev.
  3. --COMPOSER--
  4. {
  5. "repositories": [
  6. {
  7. "type": "package",
  8. "package": [
  9. {"name": "provider/requirer", "version": "1.0.0", "type": "metapackage", "require": {"b/b": "1.0.0"}},
  10. {"name": "b/b", "version": "1.0.0", "type": "metapackage", "provide": {"provided/pkg": "1.0.0"}}
  11. ]
  12. }
  13. ],
  14. "require": {
  15. "provided/pkg": "1.0.0"
  16. },
  17. "require-dev": {
  18. "provider/requirer": "1.0.0"
  19. }
  20. }
  21. --RUN--
  22. update --no-dev
  23. --EXPECT-LOCK--
  24. {
  25. "packages": [
  26. {
  27. "name": "b/b",
  28. "version": "1.0.0",
  29. "type": "metapackage",
  30. "provide": {"provided/pkg": "1.0.0"}
  31. }
  32. ],
  33. "packages-dev": [
  34. {
  35. "name": "provider/requirer",
  36. "version": "1.0.0",
  37. "type": "metapackage",
  38. "require": {"b/b": "1.0.0"}
  39. }
  40. ],
  41. "aliases": [],
  42. "minimum-stability": "stable",
  43. "stability-flags": [],
  44. "prefer-stable": false,
  45. "prefer-lowest": false,
  46. "platform": [],
  47. "platform-dev": []
  48. }
  49. --EXPECT--
  50. Installing b/b (1.0.0)