1
0
Fork 0
composer/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns.test

70 lines
2.3 KiB
Plaintext

--TEST--
Update with a package whitelist only updates those corresponding to the pattern
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "vendor/Test-Package", "version": "2.0" },
{ "name": "vendor/NotMe", "version": "2.0" },
{ "name": "exact/Test-Package", "version": "2.0" },
{ "name": "notexact/TestPackage", "version": "2.0" },
{ "name": "all/Package1", "version": "2.0" },
{ "name": "all/Package2", "version": "2.0" },
{ "name": "another/another", "version": "2.0" },
{ "name": "no/regexp", "version": "2.0" }
]
}
],
"require": {
"vendor/Test-Package": "*.*",
"vendor/NotMe": "*.*",
"exact/Test-Package": "*.*",
"notexact/TestPackage": "*.*",
"all/Package1": "*.*",
"all/Package2": "*.*",
"another/another": "*.*",
"no/regexp": "*.*"
}
}
--INSTALLED--
[
{ "name": "vendor/Test-Package", "version": "1.0" },
{ "name": "vendor/NotMe", "version": "1.0" },
{ "name": "exact/Test-Package", "version": "1.0" },
{ "name": "notexact/TestPackage", "version": "1.0" },
{ "name": "all/Package1", "version": "1.0" },
{ "name": "all/Package2", "version": "1.0" },
{ "name": "another/another", "version": "1.0" },
{ "name": "no/regexp", "version": "1.0" }
]
--LOCK--
{
"packages": [
{ "name": "vendor/Test-Package", "version": "1.0" },
{ "name": "vendor/NotMe", "version": "1.0" },
{ "name": "exact/Test-Package", "version": "1.0" },
{ "name": "notexact/TestPackage", "version": "1.0" },
{ "name": "all/Package1", "version": "1.0" },
{ "name": "all/Package2", "version": "1.0" },
{ "name": "another/another", "version": "1.0" },
{ "name": "no/regexp", "version": "1.0" }
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
--RUN--
update vendor/Test* exact/Test-Package notexact/Test all/* no/reg?xp
--EXPECT--
Upgrading all/Package1 (1.0 => 2.0)
Upgrading all/Package2 (1.0 => 2.0)
Upgrading exact/Test-Package (1.0 => 2.0)
Upgrading vendor/Test-Package (1.0 => 2.0)