From bd241cb896a2205ec651e1651e942650d9ad59b8 Mon Sep 17 00:00:00 2001 From: Niels Keurentjes Date: Wed, 27 Jan 2016 10:05:10 +0100 Subject: [PATCH] Included unit test for circular root dependencies. --- .../installer/install-self-from-root.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/Composer/Test/Fixtures/installer/install-self-from-root.test diff --git a/tests/Composer/Test/Fixtures/installer/install-self-from-root.test b/tests/Composer/Test/Fixtures/installer/install-self-from-root.test new file mode 100644 index 000000000..35a50754a --- /dev/null +++ b/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