From 6b48258432f1d166744cebc5bc23b18e69716de9 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 13 Nov 2020 14:36:50 +0100 Subject: [PATCH] Add test case for root alias on an unloadable package --- .../alias-on-unloadable-package.test | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/Composer/Test/Fixtures/installer/alias-on-unloadable-package.test diff --git a/tests/Composer/Test/Fixtures/installer/alias-on-unloadable-package.test b/tests/Composer/Test/Fixtures/installer/alias-on-unloadable-package.test new file mode 100644 index 000000000..58cd7d818 --- /dev/null +++ b/tests/Composer/Test/Fixtures/installer/alias-on-unloadable-package.test @@ -0,0 +1,30 @@ +--TEST-- +A root alias for a package which cannot be found in an acceptable version does not lead to different error. +--COMPOSER-- +{ + "repositories": [ + { + "type": "package", + "package": [ + { "name": "a/aliased", "version": "1.2.3" } + ] + } + ], + "require": { + "a/aliased": "3.0.2 as 3.0.3" + } +} +--RUN-- +update +--EXPECT-EXIT-CODE-- +2 +--EXPECT-OUTPUT-- +Loading composer repositories with package information +Updating dependencies +Your requirements could not be resolved to an installable set of packages. + + Problem 1 + - Root composer.json requires a/aliased 3.0.2 as 3.0.3, found a/aliased[1.2.3] but it does not match the constraint. + +--EXPECT-- +