From 9857145830527741a11429bceabc037b84bb8179 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 23 May 2012 11:06:45 +0200 Subject: [PATCH] Add failing test when aliasing a feature to an aliased version --- .../aliased-priority-conflicting.test | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test diff --git a/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test b/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test new file mode 100644 index 000000000..34cbb0973 --- /dev/null +++ b/tests/Composer/Test/Fixtures/installer/aliased-priority-conflicting.test @@ -0,0 +1,49 @@ +--TEST-- +Aliases take precedence over default package even if default is selected +--COMPOSER-- +{ + "repositories": [ + { + "type": "package", + "package": [ + { + "name": "a/req", "version": "dev-feature-foo", + "source": { "reference": "feat.f", "type": "git", "url": "" } + }, + { + "name": "a/req", "version": "dev-master", + "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, + "source": { "reference": "forked", "type": "git", "url": "" } + } + ] + }, + { + "type": "package", + "package": [ + { + "name": "a/a", "version": "dev-master", + "require": { "a/req": "1.*" } + }, + { + "name": "a/b", "version": "dev-master", + "require": { "a/req": "dev-master" } + }, + { + "name": "a/req", "version": "dev-master", + "extra": { "branch-alias": { "dev-master": "1.0.x-dev" } }, + "source": { "reference": "master", "type": "git", "url": "" } + } + ] + } + ], + "require": { + "a/a": "dev-master", + "a/b": "dev-master", + "a/req": "dev-feature-foo as dev-master" + } +} +--EXPECT-- +Installing a/req (dev-feature-foo feat.f) +Marking a/req (dev-master feat.f) as installed, alias of a/req (dev-master feat.f) +Installing a/b (dev-master) +Installing a/a (dev-master)