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
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
| 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
"""
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.
+ """