From: Matt Boynes Date: Fri, 27 Dec 2013 20:42:24 +0000 (-0500) Subject: Adding feature tests for `theme enable` and `theme disable` X-Git-Url: http://git.osdn.net/view?p=wvm%2Fwvm.git;a=commitdiff_plain;h=5fac5102747ded46bbc93dc62f748178585078fb Adding feature tests for `theme enable` and `theme disable` --- diff --git a/features/theme.feature b/features/theme.feature index f14a8200..24c4237d 100644 --- a/features/theme.feature +++ b/features/theme.feature @@ -1,9 +1,8 @@ Feature: Manage WordPress themes - Background: + Scenario: Installing and deleting theme Given a WP install - Scenario: Installing and deleting theme When I run `wp theme install p2` Then STDOUT should not be empty @@ -52,6 +51,8 @@ Feature: Manage WordPress themes Then STDOUT should not be empty Scenario: Install a theme, activate, then force install an older version of the theme + Given a WP install + When I run `wp theme install p2 --version=1.4.2` Then STDOUT should not be empty @@ -72,6 +73,8 @@ Feature: Manage WordPress themes | p2 | active | available | 1.4.1 | Scenario: Get the path of an installed theme + Given a WP install + When I run `wp theme install p2` Then STDOUT should not be empty @@ -80,3 +83,55 @@ Feature: Manage WordPress themes """ wp-content/themes/p2 """ + + Scenario: Enabling and disabling a theme + Given a WP multisite install + + When I run `wp theme install p2` + Then STDOUT should not be empty + + When I run `wp theme enable p2` + Then STDOUT should contain: + """ + Success: Enabled the 'P2' theme. + """ + + When I run `wp theme disable p2` + Then STDOUT should contain: + """ + Success: Disabled the 'P2' theme. + """ + + When I run `wp theme enable p2 --activate` + Then STDOUT should contain: + """ + Success: Enabled the 'P2' theme. + Success: Switched to 'P2' theme. + """ + + When I run `wp theme enable p2 --network` + Then STDOUT should contain: + """ + Success: Network enabled the 'P2' theme. + """ + + When I run `wp theme disable p2 --network` + Then STDOUT should contain: + """ + Success: Network disabled the 'P2' theme. + """ + + Scenario: Enabling and disabling a theme without multisite + Given a WP install + + When I try `wp theme enable p2` + Then STDERR should be: + """ + Error: This is not a multisite install. + """ + + When I try `wp theme disable p2` + Then STDERR should be: + """ + Error: This is not a multisite install. + """