Browse Source

Fix integration tests

Jordi Boggiano 11 years ago
parent
commit
d99212da52

+ 2 - 2
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)
+Installing a/b (1.0.0)

+ 2 - 2
tests/Composer/Test/Fixtures/installer/suggest-installed.test

@@ -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)

+ 26 - 0
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--
+<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)

+ 2 - 2
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--
 <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)

+ 2 - 2
tests/Composer/Test/Fixtures/installer/suggest-uninstalled.test

@@ -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)

+ 1 - 1
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)

+ 2 - 2
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)
+Updating a/b (1.0.0) to a/b (2.0.0)

+ 1 - 1
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)
+Updating all/Package2 (1.0) to all/Package2 (2.0)

+ 2 - 2
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'))