forked from composer/composer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for the changes in composer#2690
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
tests/Composer/Test/Fixtures/installer/broken-deps-do-not-replace.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,25 @@ | ||
--TEST-- | ||
Broken dependencies should not lead to a replacer being installed which is not mentioned by name | ||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{ "name": "a/a", "version": "1.0.0" }, | ||
{ "name": "b/b", "version": "1.0.0", "require": {"c/c": "1.*"} }, | ||
{ "name": "c/c", "version": "1.0.0", "replace": {"a/a": "1.0.0" },"require":{"x/x": "1.0"}}, | ||
{ "name": "d/d", "version": "1.0.0", "replace": {"a/a": "1.0.0", "c/c":"1.0.0" }} | ||
] | ||
} | ||
], | ||
"require": { | ||
"a/a": "1.*", | ||
"b/b": "1.*" | ||
} | ||
} | ||
--RUN-- | ||
install | ||
--EXPECT-EXIT-CODE-- | ||
2 | ||
--EXPECT-- |
24 changes: 24 additions & 0 deletions
24
tests/Composer/Test/Fixtures/installer/replace-root-require.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,24 @@ | ||
--TEST-- | ||
Ensure a transiently required replacer can replace root requirements | ||
--COMPOSER-- | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "package", | ||
"package": [ | ||
{ "name": "a/a", "version": "1.0.0" }, | ||
{ "name": "b/b", "version": "1.0.0", "require": {"c/c": "1.*"} }, | ||
{ "name": "c/c", "version": "1.0.0", "replace": {"a/a": "1.0.0" }} | ||
] | ||
} | ||
], | ||
"require": { | ||
"a/a": "1.*", | ||
"b/b": "1.*" | ||
} | ||
} | ||
--RUN-- | ||
install | ||
--EXPECT-- | ||
Installing c/c (1.0.0) | ||
Installing b/b (1.0.0) |