mirror of
https://gh.wpcy.net/https://github.com/wp-cli/extension-command.git
synced 2026-04-28 17:43:10 +08:00
29 lines
722 B
Gherkin
29 lines
722 B
Gherkin
Feature: Delete WordPress themes
|
|
|
|
Background:
|
|
Given a WP install
|
|
And I run `wp theme install p2`
|
|
|
|
Scenario: Delete an installed theme
|
|
When I run `wp theme delete p2`
|
|
Then STDOUT should be:
|
|
"""
|
|
Deleted 'p2' theme.
|
|
Success: Deleted 1 of 1 themes.
|
|
"""
|
|
And the return code should be 0
|
|
|
|
Scenario: Attempting to delete a theme that doesn't exist
|
|
When I run `wp theme delete p2`
|
|
Then STDOUT should not be empty
|
|
|
|
When I try the previous command again
|
|
Then STDOUT should be:
|
|
"""
|
|
Success: Theme already deleted.
|
|
"""
|
|
And STDERR should be:
|
|
"""
|
|
Warning: The 'p2' theme could not be found.
|
|
"""
|
|
And the return code should be 0
|