forked from composer/composer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test and fix update whitelist feature
- Loading branch information
Showing
2 changed files
with
54 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/Composer/Test/Fixtures/installer/update-whitelist.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--TEST-- | ||
Update with a package whitelist only updates those packages and their dependencies if they are not present in composer.json | ||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{ "name": "fixed", "version": "1.1.0" }, | ||
{ "name": "fixed", "version": "1.0.0" }, | ||
{ "name": "whitelisted", "version": "1.1.0", "require": { "dependency": "1.1.0" } }, | ||
{ "name": "whitelisted", "version": "1.0.0", "require": { "dependency": "1.0.0" } }, | ||
{ "name": "dependency", "version": "1.1.0" }, | ||
{ "name": "dependency", "version": "1.0.0" } | ||
] | ||
} | ||
], | ||
"require": { | ||
"fixed": "1.*", | ||
"whitelisted": "1.*" | ||
} | ||
} | ||
--INSTALLED-- | ||
[ | ||
{ "name": "fixed", "version": "1.0.0" }, | ||
{ "name": "whitelisted", "version": "1.0.0" }, | ||
{ "name": "dependency", "version": "1.0.0" } | ||
] | ||
--RUN-- | ||
update whitelisted | ||
--EXPECT-- | ||
Updating dependency (1.0.0) to dependency (1.1.0) | ||
Updating whitelisted (1.0.0) to whitelisted (1.1.0) |