install-self-from-root.test 366 B

12345678910111213141516
  1. --TEST--
  2. Tries to require a package with the same name as the root package
  3. --COMPOSER--
  4. {
  5. "name": "foo/bar",
  6. "require": {
  7. "foo/bar": "@dev"
  8. }
  9. }
  10. --RUN--
  11. install
  12. --EXPECT-EXCEPTION--
  13. RuntimeException
  14. --EXPECT--
  15. Root package 'foo/bar' cannot require itself in its composer.json
  16. Did you accidentally name your root package after an external package?