From d884b26aa357dc955c6eefb395b769bc1ceca48c Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 26 Nov 2014 19:51:13 +0100 Subject: [PATCH] Add test case for removing unused dependencies on whitelisted update --- .../update-whitelist-removes-unused.test | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test diff --git a/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test b/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test new file mode 100644 index 000000000..e658e8c06 --- /dev/null +++ b/tests/Composer/Test/Fixtures/installer/update-whitelist-removes-unused.test @@ -0,0 +1,32 @@ +--TEST-- +Update with a package whitelist removes unused packages +--COMPOSER-- +{ + "repositories": [ + { + "type": "package", + "package": [ + { "name": "whitelisted", "version": "1.1.0" }, + { "name": "whitelisted", "version": "1.0.0", "require": { "fixed-dependency": "1.0.0", "old-dependency": "1.0.0" } }, + { "name": "fixed-dependency", "version": "1.1.0" }, + { "name": "fixed-dependency", "version": "1.0.0" }, + { "name": "old-dependency", "version": "1.0.0" } + ] + } + ], + "require": { + "whitelisted": "1.*", + "fixed-dependency": "1.*" + } +} +--INSTALLED-- +[ + { "name": "whitelisted", "version": "1.0.0", "require": { "old-dependency": "1.0.0", "fixed-dependency": "1.0.0" } }, + { "name": "fixed-dependency", "version": "1.0.0" }, + { "name": "old-dependency", "version": "1.0.0" } +] +--RUN-- +update --with-dependencies whitelisted +--EXPECT-- +Uninstalling old-dependency (1.0.0) +Updating whitelisted (1.0.0) to whitelisted (1.1.0)