diff --git a/features/package-install.feature b/features/package-install.feature index 39cc52324..7440eb4a3 100644 --- a/features/package-install.feature +++ b/features/package-install.feature @@ -149,7 +149,14 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli/google-sitemap-generator-cli (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering git@github.com:wp-cli/google-sitemap-generator-cli.git as a VCS repository... Using Composer to install the package... """ @@ -172,8 +179,11 @@ Feature: Install WP-CLI packages When I run `wp package uninstall wp-cli/google-sitemap-generator-cli` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json - Removing repository details from {PACKAGE_PATH}composer.json + Removing require statement from + """ + Then STDOUT should contain: + """ + Removing repository details from """ And the {PACKAGE_PATH}composer.json file should not contain: """ @@ -207,7 +217,14 @@ Feature: Install WP-CLI packages And STDOUT should contain: """ Installing package capitalwpcli/examplecommand (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering https://github.com/CapitalWPCLI/examplecommand.git as a VCS repository... Using Composer to install the package... """ @@ -265,17 +282,23 @@ Feature: Install WP-CLI packages Success: Test Mixed Case Command Name """ - # Current releases of schlessera/test-command are PHP 5.5 dependent. - @github-api @shortened @require-php-5.5 + @github-api @shortened Scenario: Install a package from Git using a shortened package identifier Given an empty directory - When I run `wp package install schlessera/test-command` + When I run `wp package install wp-cli-test/test-command` Then STDOUT should contain: """ - Installing package schlessera/test-command (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... - Registering https://github.com/schlessera/test-command.git as a VCS repository... + Installing package wp-cli-test/test-command (dev-master) + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ + Registering https://github.com/wp-cli-test/test-command.git as a VCS repository... Using Composer to install the package... """ And STDOUT should contain: @@ -285,8 +308,8 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name,version` Then STDOUT should be a table containing rows: - | name | version | - | schlessera/test-command | dev-master | + | name | version | + | wp-cli-test/test-command | dev-master | When I run `wp test-command` Then STDOUT should contain: @@ -294,10 +317,10 @@ Feature: Install WP-CLI packages Success: Version E. """ - When I run `wp package uninstall schlessera/test-command` + When I run `wp package uninstall wp-cli-test/test-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -307,20 +330,27 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name` Then STDOUT should not contain: """ - schlessera/test-command + wp-cli-test/test-command """ - # Current releases of schlessera/test-command are PHP 5.5 dependent. + # Older releases of wp-cli-test/test-command are PHP 5.5 dependent. @github-api @shortened @require-php-5.5 Scenario: Install a package from Git using a shortened package identifier with a version requirement Given an empty directory - When I run `wp package install schlessera/test-command:^0` + When I run `wp package install wp-cli-test/test-command:^0` Then STDOUT should contain: """ - Installing package schlessera/test-command (^0) - Updating {PACKAGE_PATH}composer.json to require the package... - Registering https://github.com/schlessera/test-command.git as a VCS repository... + Installing package wp-cli-test/test-command (^0) + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ + Registering https://github.com/wp-cli-test/test-command.git as a VCS repository... Using Composer to install the package... """ And STDOUT should contain: @@ -330,8 +360,8 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name,version` Then STDOUT should be a table containing rows: - | name | version | - | schlessera/test-command | v0.2.0 | + | name | version | + | wp-cli-test/test-command | v0.2.0 | When I run `wp test-command` Then STDOUT should contain: @@ -339,10 +369,10 @@ Feature: Install WP-CLI packages Success: Version C. """ - When I run `wp package uninstall schlessera/test-command` + When I run `wp package uninstall wp-cli-test/test-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -352,28 +382,34 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name` Then STDOUT should not contain: """ - schlessera/test-command + wp-cli-test/test-command """ - # Current releases of schlessera/test-command are PHP 5.5 dependent. + # Older releases of wp-cli-test/test-command are PHP 5.5 dependent. @github-api @shortened @require-php-5.5 Scenario: Install a package from Git using a shortened package identifier with a specific version Given an empty directory # Need to specify actual tag. - When I try `wp package install schlessera/test-command:0.1.0` + When I try `wp package install wp-cli-test/test-command:0.1.0` Then STDERR should contain: """ - Error: Couldn't download composer.json file from 'https://raw.githubusercontent.com/schlessera/test-command/0.1.0/composer.json' (HTTP code 404). + Warning: Couldn't download composer.json file from 'https://raw.githubusercontent.com/wp-cli-test/test-command/0.1.0/composer.json' (HTTP code 404). """ - And STDOUT should be empty - When I run `wp package install schlessera/test-command:v0.1.0` + When I run `wp package install wp-cli-test/test-command:v0.1.0` Then STDOUT should contain: """ - Installing package schlessera/test-command (v0.1.0) - Updating {PACKAGE_PATH}composer.json to require the package... - Registering https://github.com/schlessera/test-command.git as a VCS repository... + Installing package wp-cli-test/test-command (v0.1.0) + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ + Registering https://github.com/wp-cli-test/test-command.git as a VCS repository... Using Composer to install the package... """ And STDOUT should contain: @@ -383,8 +419,8 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name,version` Then STDOUT should be a table containing rows: - | name | version | - | schlessera/test-command | v0.1.0 | + | name | version | + | wp-cli-test/test-command | v0.1.0 | When I run `wp test-command` Then STDOUT should contain: @@ -392,10 +428,10 @@ Feature: Install WP-CLI packages Success: Version A. """ - When I run `wp package uninstall schlessera/test-command` + When I run `wp package uninstall wp-cli-test/test-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -405,20 +441,27 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name` Then STDOUT should not contain: """ - schlessera/test-command + wp-cli-test/test-command """ - # Current releases of schlessera/test-command are PHP 5.5 dependent. + # Older releases of wp-cli-test/test-command are PHP 5.5 dependent. @github-api @shortened @require-php-5.5 Scenario: Install a package from Git using a shortened package identifier and a specific commit hash Given an empty directory - When I run `wp package install schlessera/test-command:dev-master#8e99bba16a65a3cde7405178a6badbb49349f554` + When I run `wp package install wp-cli-test/test-command:dev-master#e1b60d6d2af5799231ce7c84f2089c16dd845be1` Then STDOUT should contain: """ - Installing package schlessera/test-command (dev-master#8e99bba16a65a3cde7405178a6badbb49349f554) - Updating {PACKAGE_PATH}composer.json to require the package... - Registering https://github.com/schlessera/test-command.git as a VCS repository... + Installing package wp-cli-test/test-command (dev-master#e1b60d6d2af5799231ce7c84f2089c16dd845be1) + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ + Registering https://github.com/wp-cli-test/test-command.git as a VCS repository... Using Composer to install the package... """ And STDOUT should contain: @@ -428,8 +471,8 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name,version` Then STDOUT should be a table containing rows: - | name | version | - | schlessera/test-command | dev-master | + | name | version | + | wp-cli-test/test-command | dev-master | When I run `wp test-command` Then STDOUT should contain: @@ -437,10 +480,10 @@ Feature: Install WP-CLI packages Success: Version B. """ - When I run `wp package uninstall schlessera/test-command` + When I run `wp package uninstall wp-cli-test/test-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -450,20 +493,27 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name` Then STDOUT should not contain: """ - schlessera/test-command + wp-cli-test/test-command """ - # Current releases of schlessera/test-command are PHP 5.5 dependent. + # Older releases of wp-cli-test/test-command are PHP 5.5 dependent. @github-api @shortened @require-php-5.5 Scenario: Install a package from Git using a shortened package identifier and a branch Given an empty directory - When I run `wp package install schlessera/test-command:dev-custom-branch` + When I run `wp package install wp-cli-test/test-command:dev-custom-branch` Then STDOUT should contain: """ - Installing package schlessera/test-command (dev-custom-branch) - Updating {PACKAGE_PATH}composer.json to require the package... - Registering https://github.com/schlessera/test-command.git as a VCS repository... + Installing package wp-cli-test/test-command (dev-custom-branch) + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ + Registering https://github.com/wp-cli-test/test-command.git as a VCS repository... Using Composer to install the package... """ And STDOUT should contain: @@ -473,8 +523,8 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name,version` Then STDOUT should be a table containing rows: - | name | version | - | schlessera/test-command | dev-custom-branch | + | name | version | + | wp-cli-test/test-command | dev-custom-branch | When I run `wp test-command` Then STDOUT should contain: @@ -482,10 +532,10 @@ Feature: Install WP-CLI packages Success: Version D. """ - When I run `wp package uninstall schlessera/test-command` + When I run `wp package uninstall wp-cli-test/test-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -495,7 +545,7 @@ Feature: Install WP-CLI packages When I run `wp package list --fields=name` Then STDOUT should not contain: """ - schlessera/test-command + wp-cli-test/test-command """ @github-api @@ -508,7 +558,14 @@ Feature: Install WP-CLI packages And STDOUT should contain: """ Installing package GeekPress/wp-rocket-cli (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Using Composer to install the package... """ And STDOUT should contain: @@ -538,7 +595,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall GeekPress/wp-rocket-cli` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -555,7 +612,14 @@ Feature: Install WP-CLI packages And STDOUT should contain: """ Installing package GeekPress/wp-rocket-cli (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Using Composer to install the package... """ And STDOUT should contain: @@ -585,7 +649,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall geekpress/wp-rocket-cli` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -604,7 +668,11 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli-test/version-composer-json-different (v1.0.0) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... """ And STDOUT should contain: """ @@ -625,7 +693,11 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli-test/version-composer-json-different (v1.0.1) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... """ And STDOUT should contain: """ @@ -650,7 +722,14 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli/google-sitemap-generator-cli (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering {PACKAGE_PATH}local/wp-cli-google-sitemap-generator-cli as a path repository... Using Composer to install the package... """ @@ -673,7 +752,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall wp-cli/google-sitemap-generator-cli` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -699,7 +778,14 @@ Feature: Install WP-CLI packages And STDOUT should contain: """ Installing package capitalwpcli/examplecommand (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering https://github.com/CapitalWPCLI/examplecommand.git as a VCS repository... Using Composer to install the package... """ @@ -730,7 +816,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall capitalwpcli/examplecommand` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -755,7 +841,14 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli/google-sitemap-generator-cli (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering {PACKAGE_PATH}local/wp-cli-google-sitemap-generator-cli as a path repository... Using Composer to install the package... """ @@ -778,7 +871,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall wp-cli/google-sitemap-generator-cli` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -825,7 +918,14 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli/community-command (dev-master) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering {CURRENT_PATH}/path-command as a path repository... Using Composer to install the package... """ @@ -848,7 +948,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall wp-cli/community-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """ @@ -897,7 +997,14 @@ Feature: Install WP-CLI packages Then STDOUT should contain: """ Installing package wp-cli/community-command (0.2.0-beta) - Updating {PACKAGE_PATH}composer.json to require the package... + """ + # This path is sometimes changed on Macs to prefix with /private + And STDOUT should contain: + """ + {PACKAGE_PATH}composer.json to require the package... + """ + And STDOUT should contain: + """ Registering {CURRENT_PATH}/path-command as a path repository... Using Composer to install the package... """ @@ -920,7 +1027,7 @@ Feature: Install WP-CLI packages When I run `wp package uninstall wp-cli/community-command` Then STDOUT should contain: """ - Removing require statement from {PACKAGE_PATH}composer.json + Removing require statement from """ And STDOUT should contain: """