diff --git a/tests/Composer/Test/Fixtures/installer/install-dev.test b/tests/Composer/Test/Fixtures/installer/install-dev.test index 3b03675bb..b6543fb1b 100644 --- a/tests/Composer/Test/Fixtures/installer/install-dev.test +++ b/tests/Composer/Test/Fixtures/installer/install-dev.test @@ -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) \ No newline at end of file +Installing a/b (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/suggest-installed.test b/tests/Composer/Test/Fixtures/installer/suggest-installed.test index f46102d0a..94f6c2016 100644 --- a/tests/Composer/Test/Fixtures/installer/suggest-installed.test +++ b/tests/Composer/Test/Fixtures/installer/suggest-installed.test @@ -20,10 +20,10 @@ Suggestions are not displayed for installed packages install --EXPECT-OUTPUT-- Loading composer repositories with package information -Installing dependencies +Installing dependencies (including require-dev) Writing lock file Generating autoload files --EXPECT-- Installing a/a (1.0.0) -Installing b/b (1.0.0) \ No newline at end of file +Installing b/b (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/suggest-prod.test b/tests/Composer/Test/Fixtures/installer/suggest-prod.test new file mode 100644 index 000000000..290ccf4bb --- /dev/null +++ b/tests/Composer/Test/Fixtures/installer/suggest-prod.test @@ -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-- +Loading composer repositories with package information +Installing dependencies +Writing lock file +Generating autoload files + +--EXPECT-- +Installing a/a (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/suggest-replaced.test b/tests/Composer/Test/Fixtures/installer/suggest-replaced.test index d1e8f6102..0817c7e08 100644 --- a/tests/Composer/Test/Fixtures/installer/suggest-replaced.test +++ b/tests/Composer/Test/Fixtures/installer/suggest-replaced.test @@ -20,10 +20,10 @@ Suggestions are not displayed for packages if they are replaced install --EXPECT-OUTPUT-- Loading composer repositories with package information -Installing dependencies +Installing dependencies (including require-dev) Writing lock file Generating autoload files --EXPECT-- Installing a/a (1.0.0) -Installing c/c (1.0.0) \ No newline at end of file +Installing c/c (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test b/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test index d2ea37766..d7e026e98 100644 --- a/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test +++ b/tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test @@ -18,10 +18,10 @@ Suggestions are displayed install --EXPECT-OUTPUT-- Loading composer repositories with package information -Installing dependencies +Installing dependencies (including require-dev) a/a suggests installing b/b (an obscure reason) Writing lock file Generating autoload files --EXPECT-- -Installing a/a (1.0.0) \ No newline at end of file +Installing a/a (1.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/update-all-dry-run.test b/tests/Composer/Test/Fixtures/installer/update-all-dry-run.test index 191f97495..cca859e9f 100644 --- a/tests/Composer/Test/Fixtures/installer/update-all-dry-run.test +++ b/tests/Composer/Test/Fixtures/installer/update-all-dry-run.test @@ -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) diff --git a/tests/Composer/Test/Fixtures/installer/update-all.test b/tests/Composer/Test/Fixtures/installer/update-all.test index ad5e1d3be..a9bb435a1 100644 --- a/tests/Composer/Test/Fixtures/installer/update-all.test +++ b/tests/Composer/Test/Fixtures/installer/update-all.test @@ -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) \ No newline at end of file +Updating a/b (1.0.0) to a/b (2.0.0) diff --git a/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns.test b/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns.test index e8aa593c0..de1fb1b73 100644 --- a/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns.test +++ b/tests/Composer/Test/Fixtures/installer/update-whitelist-patterns.test @@ -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) \ No newline at end of file +Updating all/Package2 (1.0) to all/Package2 (2.0) diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index cc17973bc..a88ce7c21 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -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'))