Browse Source

Included unit test for circular root dependencies.

Niels Keurentjes 9 years ago
parent
commit
bd241cb896
1 changed files with 16 additions and 0 deletions
  1. 16 0
      tests/Composer/Test/Fixtures/installer/install-self-from-root.test

+ 16 - 0
tests/Composer/Test/Fixtures/installer/install-self-from-root.test

@@ -0,0 +1,16 @@
+--TEST--
+Tries to require a package with the same name as the root package
+--COMPOSER--
+{
+    "name": "foo/bar",
+    "require": {
+        "foo/bar": "@dev"
+    }
+}
+--RUN--
+install
+--EXPECT-OUTPUT--
+Root package 'foo/bar' cannot require itself in its composer.json
+Did you accidentally name your root package after an external package?
+--EXPECT--
+EXCEPTION