diff --git a/features/plugin-status.feature b/features/plugin-status.feature index 23668dd1..87f1add4 100644 --- a/features/plugin-status.feature +++ b/features/plugin-status.feature @@ -8,7 +8,7 @@ Feature: List the status of plugins ` instead. + """ + And the return code should be 0 diff --git a/features/plugin-uninstall.feature b/features/plugin-uninstall.feature index 8292fe70..bd06d9d7 100644 --- a/features/plugin-uninstall.feature +++ b/features/plugin-uninstall.feature @@ -186,7 +186,7 @@ Feature: Uninstall a WordPress plugin Scenario: Uninstalling a plugin should remove its update info Given a WP install And I run `wp plugin install wordpress-importer --version=0.6` - And I run `wp plugin status wordpress-importer` + And I try `wp plugin status wordpress-importer` And I run `wp transient get --network update_plugins` Then STDOUT should contain: diff --git a/features/plugin-update.feature b/features/plugin-update.feature index 86c5f68c..d8dbd588 100644 --- a/features/plugin-update.feature +++ b/features/plugin-update.feature @@ -60,7 +60,7 @@ Feature: Update WordPress plugins package from https://downloads.wordpress.org/plugin/wordpress-importer.0.5.zip... """ - When I run `wp plugin status wordpress-importer` + When I try `wp plugin status wordpress-importer` Then STDOUT should contain: """ Update available @@ -72,7 +72,7 @@ Feature: Update WordPress plugins wordpress-importer """ - When I run `wp plugin status wordpress-importer` + When I try `wp plugin status wordpress-importer` Then STDOUT should contain: """ Update available diff --git a/features/plugin.feature b/features/plugin.feature index ec1f1192..32b6d01c 100644 --- a/features/plugin.feature +++ b/features/plugin.feature @@ -38,7 +38,7 @@ Feature: Manage WordPress plugins # Check that the inner-plugin is not picked up When I run `mv {PLUGIN_DIR}/plugin1 {PLUGIN_DIR}/Zombieland/` - And I run `wp plugin status Zombieland` + And I try `wp plugin status Zombieland` Then STDOUT should contain: """ Plugin Zombieland details: @@ -52,13 +52,13 @@ Feature: Manage WordPress plugins When I run `wp plugin activate Zombieland` Then STDOUT should not be empty - When I run `wp plugin status Zombieland` + When I try `wp plugin status Zombieland` Then STDOUT should contain: """ Status: Active """ - When I run `wp plugin status` + When I try `wp plugin status` Then STDOUT should not be empty When I run `wp plugin list --fields=name,status,update,version,update_version,auto_update` @@ -198,7 +198,7 @@ Feature: Manage WordPress plugins Success: Activated 1 of 1 plugins. """ - When I run `wp plugin status network-only` + When I try `wp plugin status network-only` Then STDOUT should contain: """ Status: Active @@ -220,7 +220,7 @@ Feature: Manage WordPress plugins Success: Activated 1 of 1 plugins. """ - When I run `wp plugin status network-only` + When I try `wp plugin status network-only` Then STDOUT should contain: """ Status: Network Active diff --git a/features/theme.feature b/features/theme.feature index ff9c1cc1..ee8a3db7 100644 --- a/features/theme.feature +++ b/features/theme.feature @@ -1,5 +1,15 @@ Feature: Manage WordPress themes + Scenario: Theme status command is deprecated + Given a WP install + + When I try `wp theme status` + Then STDERR should contain: + """ + Warning: The `theme status` command is deprecated. Use `wp theme list` or `wp theme get ` instead. + """ + And the return code should be 0 + Scenario: Installing and deleting theme Given a WP install And I run `wp theme delete --all --force` @@ -8,7 +18,7 @@ Feature: Manage WordPress themes When I run `wp theme install twentytwelve` Then STDOUT should not be empty - When I run `wp theme status twentytwelve` + When I try `wp theme status twentytwelve` Then STDOUT should contain: """ Theme twentytwelve details: @@ -64,7 +74,7 @@ Feature: Manage WordPress themes When I run `wp theme install classic --activate` And I run `wp theme list --field=name --status=inactive | xargs wp theme delete` - And I run `wp theme status` + And I try `wp theme status` Then STDOUT should be: """ 1 installed theme: @@ -155,7 +165,7 @@ Feature: Manage WordPress themes Success: Deleted """ - When I run `wp theme status twentytwelve` + When I try `wp theme status twentytwelve` Then STDOUT should contain: """ Update available @@ -167,7 +177,7 @@ Feature: Manage WordPress themes twentytwelve """ - When I run `wp theme status twentytwelve` + When I try `wp theme status twentytwelve` Then STDOUT should contain: """ Update available @@ -305,6 +315,7 @@ Feature: Manage WordPress themes When I try `wp theme status myth` Then STDERR should be: """ + Warning: The `theme status` command is deprecated. Use `wp theme list` or `wp theme get ` instead. Error: Stylesheet is missing. """ And STDOUT should be empty @@ -558,12 +569,15 @@ Feature: Manage WordPress themes This theme requires a parent theme. Checking if it is installed """ - When I run `wp theme status moina` + When I try `wp theme status moina` Then STDOUT should contain: """ Theme moina details: """ - And STDERR should be empty + And STDERR should contain: + """ + Warning: The `theme status` command is deprecated. Use `wp theme list` or `wp theme get ` instead. + """ Scenario: Get status field in theme detail Given a WP install diff --git a/features/upgradables.feature b/features/upgradables.feature index c6722c24..17b454f5 100644 --- a/features/upgradables.feature +++ b/features/upgradables.feature @@ -75,13 +75,13 @@ Feature: Manage WordPress themes and plugins [""] """ - When I run `wp status` + When I try `wp status` Then STDOUT should contain: """ U = Update Available """ - When I run `wp status ` + When I try `wp status ` Then STDOUT should contain: """ Status: Inactive @@ -104,7 +104,7 @@ Feature: Manage WordPress themes and plugins updated """ - When I run `wp status ` + When I try `wp status ` Then STDOUT should not contain: """ (Update available) diff --git a/src/Plugin_Command.php b/src/Plugin_Command.php index c5b6f7dc..dc7e952d 100644 --- a/src/Plugin_Command.php +++ b/src/Plugin_Command.php @@ -109,6 +109,8 @@ protected function get_upgrader_class( $force ) { * Version: 20160523.1 * Author: Otto42, pross * Description: A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool! + * + * @deprecated Use `wp plugin list` or `wp plugin get ` instead. */ public function status( $args ) { parent::status( $args ); diff --git a/src/Theme_Command.php b/src/Theme_Command.php index 0f854b0d..642a3157 100644 --- a/src/Theme_Command.php +++ b/src/Theme_Command.php @@ -96,6 +96,8 @@ protected function get_upgrader_class( $force ) { * Status: Inactive * Version: 1.2 * Author: the WordPress team + * + * @deprecated Use `wp theme list` or `wp theme get ` instead. */ public function status( $args ) { if ( isset( $args[0] ) ) {