Fix integration tests
parent
3c0edd8c7f
commit
d99212da52
|
@ -19,7 +19,7 @@ Installs a package in dev env
|
|||
}
|
||||
}
|
||||
--RUN--
|
||||
install --dev
|
||||
install
|
||||
--EXPECT--
|
||||
Installing a/a (1.0.0)
|
||||
Installing a/b (1.0.0)
|
||||
Installing a/b (1.0.0)
|
||||
|
|
|
@ -20,10 +20,10 @@ Suggestions are not displayed for installed packages
|
|||
install
|
||||
--EXPECT-OUTPUT--
|
||||
<info>Loading composer repositories with package information</info>
|
||||
<info>Installing dependencies</info>
|
||||
<info>Installing dependencies (including require-dev)</info>
|
||||
<info>Writing lock file</info>
|
||||
<info>Generating autoload files</info>
|
||||
|
||||
--EXPECT--
|
||||
Installing a/a (1.0.0)
|
||||
Installing b/b (1.0.0)
|
||||
Installing b/b (1.0.0)
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
--TEST--
|
||||
Suggestions are not displayed in non-dev mode
|
||||
--COMPOSER--
|
||||
{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": [
|
||||
{ "name": "a/a", "version": "1.0.0", "suggest": { "b/b": "an obscure reason" } }
|
||||
]
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"a/a": "1.0.0"
|
||||
}
|
||||
}
|
||||
--RUN--
|
||||
install --no-dev
|
||||
--EXPECT-OUTPUT--
|
||||
<info>Loading composer repositories with package information</info>
|
||||
<info>Installing dependencies</info>
|
||||
<info>Writing lock file</info>
|
||||
<info>Generating autoload files</info>
|
||||
|
||||
--EXPECT--
|
||||
Installing a/a (1.0.0)
|
|
@ -20,10 +20,10 @@ Suggestions are not displayed for packages if they are replaced
|
|||
install
|
||||
--EXPECT-OUTPUT--
|
||||
<info>Loading composer repositories with package information</info>
|
||||
<info>Installing dependencies</info>
|
||||
<info>Installing dependencies (including require-dev)</info>
|
||||
<info>Writing lock file</info>
|
||||
<info>Generating autoload files</info>
|
||||
|
||||
--EXPECT--
|
||||
Installing a/a (1.0.0)
|
||||
Installing c/c (1.0.0)
|
||||
Installing c/c (1.0.0)
|
||||
|
|
|
@ -18,10 +18,10 @@ Suggestions are displayed
|
|||
install
|
||||
--EXPECT-OUTPUT--
|
||||
<info>Loading composer repositories with package information</info>
|
||||
<info>Installing dependencies</info>
|
||||
<info>Installing dependencies (including require-dev)</info>
|
||||
a/a suggests installing b/b (an obscure reason)
|
||||
<info>Writing lock file</info>
|
||||
<info>Generating autoload files</info>
|
||||
|
||||
--EXPECT--
|
||||
Installing a/a (1.0.0)
|
||||
Installing a/a (1.0.0)
|
||||
|
|
|
@ -34,7 +34,7 @@ Updates updateable packages in dry-run mode
|
|||
{ "name": "a/b", "version": "1.0.0" }
|
||||
]
|
||||
--RUN--
|
||||
update --dev --dry-run
|
||||
update --dry-run
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0) to a/a (1.0.1)
|
||||
Updating a/b (1.0.0) to a/b (2.0.0)
|
||||
|
|
|
@ -34,7 +34,7 @@ Updates updateable packages
|
|||
{ "name": "a/b", "version": "1.0.0" }
|
||||
]
|
||||
--RUN--
|
||||
update --dev
|
||||
update
|
||||
--EXPECT--
|
||||
Updating a/a (1.0.0) to a/a (1.0.1)
|
||||
Updating a/b (1.0.0) to a/b (2.0.0)
|
||||
Updating a/b (1.0.0) to a/b (2.0.0)
|
||||
|
|
|
@ -45,4 +45,4 @@ update vendor/Test* exact/Test-Package notexact/Test all/* no/reg?xp
|
|||
Updating vendor/Test-Package (1.0) to vendor/Test-Package (2.0)
|
||||
Updating exact/Test-Package (1.0) to exact/Test-Package (2.0)
|
||||
Updating all/Package1 (1.0) to all/Package1 (2.0)
|
||||
Updating all/Package2 (1.0) to all/Package2 (2.0)
|
||||
Updating all/Package2 (1.0) to all/Package2 (2.0)
|
||||
|
|
|
@ -203,7 +203,7 @@ class InstallerTest extends TestCase
|
|||
$application = new Application;
|
||||
$application->get('install')->setCode(function ($input, $output) use ($installer) {
|
||||
$installer
|
||||
->setDevMode($input->getOption('dev'))
|
||||
->setDevMode(!$input->getOption('no-dev'))
|
||||
->setDryRun($input->getOption('dry-run'));
|
||||
|
||||
return $installer->run();
|
||||
|
@ -211,7 +211,7 @@ class InstallerTest extends TestCase
|
|||
|
||||
$application->get('update')->setCode(function ($input, $output) use ($installer) {
|
||||
$installer
|
||||
->setDevMode($input->getOption('dev'))
|
||||
->setDevMode(!$input->getOption('no-dev'))
|
||||
->setUpdate(true)
|
||||
->setDryRun($input->getOption('dry-run'))
|
||||
->setUpdateWhitelist($input->getArgument('packages'))
|
||||
|
|
Loading…
Reference in New Issue