From e6e317bc27c06c5a74f48e04ffb343796f5a1a8d Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 30 Oct 2019 00:40:36 +0100 Subject: [PATCH] Fix test configurations, missing lock files, invalid ones aliased alias test is failing because double alias is improperly resolved now --- .../installer/install-aliased-alias.test | 2 +- .../installer/install-from-empty-lock.test | 4 ++-- .../installer/partial-update-from-lock.test | 2 +- ...irements-do-not-affect-locked-versions.test | 2 +- ...e-whitelist-patterns-with-dependencies.test | 18 ++++++++++++++++++ .../update-whitelist-with-dependencies.test | 16 ++++++++++++++++ ...updating-dev-updates-url-and-reference.test | 2 +- 7 files changed, 40 insertions(+), 6 deletions(-) diff --git a/tests/Composer/Test/Fixtures/installer/install-aliased-alias.test b/tests/Composer/Test/Fixtures/installer/install-aliased-alias.test index f535caa7e..2c047f8bb 100644 --- a/tests/Composer/Test/Fixtures/installer/install-aliased-alias.test +++ b/tests/Composer/Test/Fixtures/installer/install-aliased-alias.test @@ -31,6 +31,6 @@ Installing double aliased package install --EXPECT-- Installing b/b (dev-foo) +Marking b/b (1.0.x-dev) as installed, alias of b/b (dev-foo) Marking b/b (dev-master) as installed, alias of b/b (dev-foo) Installing a/a (dev-master) -Marking b/b (1.0.x-dev) as installed, alias of b/b (dev-foo) diff --git a/tests/Composer/Test/Fixtures/installer/install-from-empty-lock.test b/tests/Composer/Test/Fixtures/installer/install-from-empty-lock.test index 7bb69f131..c3abd2377 100644 --- a/tests/Composer/Test/Fixtures/installer/install-from-empty-lock.test +++ b/tests/Composer/Test/Fixtures/installer/install-from-empty-lock.test @@ -21,7 +21,7 @@ Requirements from the composer file are not installed if the lock file is presen "packages": [ { "name": "required", "version": "1.0.0" } ], - "packages-dev": null, + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], @@ -31,4 +31,4 @@ Requirements from the composer file are not installed if the lock file is presen --RUN-- install --EXPECT-- -Installing required (1.0.0) \ No newline at end of file +Installing required (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/partial-update-from-lock.test b/tests/Composer/Test/Fixtures/installer/partial-update-from-lock.test index ed2002e4e..f49f23dfd 100644 --- a/tests/Composer/Test/Fixtures/installer/partial-update-from-lock.test +++ b/tests/Composer/Test/Fixtures/installer/partial-update-from-lock.test @@ -74,8 +74,8 @@ update b/unstable "platform-dev": [] } --EXPECT-- -Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0) Updating a/old (0.9.0) to a/old (1.0.0) +Updating b/unstable (1.1.0-alpha) to b/unstable (1.0.0) Updating c/uptodate (2.0.0) to c/uptodate (1.0.0) Installing d/removed (1.0.0) Installing e/newreq (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/root-requirements-do-not-affect-locked-versions.test b/tests/Composer/Test/Fixtures/installer/root-requirements-do-not-affect-locked-versions.test index 15d1b4ef5..8868cbe13 100644 --- a/tests/Composer/Test/Fixtures/installer/root-requirements-do-not-affect-locked-versions.test +++ b/tests/Composer/Test/Fixtures/installer/root-requirements-do-not-affect-locked-versions.test @@ -23,7 +23,7 @@ The locked version will not get overwritten by an install { "name": "foo/bar", "version": "1.0.0" }, { "name": "foo/baz", "version": "2.0.0" } ], - "packages-dev": null, + "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns-with-dependencies.test b/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns-with-dependencies.test index c685f14ce..aee2310ac 100644 --- a/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns-with-dependencies.test +++ b/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns-with-dependencies.test @@ -41,6 +41,24 @@ Update with a package whitelist only updates those packages and their dependenci { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } }, { "name": "unrelated-dependency", "version": "1.0.0" } ] +--LOCK-- +{ + "packages": [ + { "name": "fixed", "version": "1.0.0" }, + { "name": "whitelisted-component1", "version": "1.0.0" }, + { "name": "whitelisted-component2", "version": "1.0.0", "require": { "dependency": "1.0.0" } }, + { "name": "root-dependency", "version": "1.0.0" }, + { "name": "dependency", "version": "1.0.0" }, + { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } }, + { "name": "unrelated-dependency", "version": "1.0.0" } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": {"a/a":20}, + "prefer-stable": false, + "prefer-lowest": false +} --RUN-- update whitelisted-* --with-dependencies --EXPECT-- diff --git a/tests/Composer/Test/Fixtures/installer/update-whitelist-with-dependencies.test b/tests/Composer/Test/Fixtures/installer/update-whitelist-with-dependencies.test index bb2e04193..73acfa516 100644 --- a/tests/Composer/Test/Fixtures/installer/update-whitelist-with-dependencies.test +++ b/tests/Composer/Test/Fixtures/installer/update-whitelist-with-dependencies.test @@ -33,6 +33,22 @@ Update with a package whitelist only updates those packages and their dependenci { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } }, { "name": "unrelated-dependency", "version": "1.0.0" } ] +--LOCK-- +{ + "packages": [ + { "name": "fixed", "version": "1.0.0" }, + { "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0" } }, + { "name": "dependency", "version": "1.0.0" }, + { "name": "unrelated", "version": "1.0.0", "require": { "unrelated-dependency": "1.*" } }, + { "name": "unrelated-dependency", "version": "1.0.0" } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": {"a/a":20}, + "prefer-stable": false, + "prefer-lowest": false +} --RUN-- update whitelisted --with-dependencies --EXPECT-- diff --git a/tests/Composer/Test/Fixtures/installer/updating-dev-updates-url-and-reference.test b/tests/Composer/Test/Fixtures/installer/updating-dev-updates-url-and-reference.test index c5c838517..06870c4ee 100644 --- a/tests/Composer/Test/Fixtures/installer/updating-dev-updates-url-and-reference.test +++ b/tests/Composer/Test/Fixtures/installer/updating-dev-updates-url-and-reference.test @@ -28,7 +28,7 @@ Updating a dev package for new reference updates the url and reference "dist": { "reference": "oldref", "url": "oldurl", "type": "zip", "shasum": "" } } ], - "packages-dev": null, + "packages-dev": [], "aliases": [], "minimum-stability": "dev", "stability-flags": {"a/a":20},