mirror of
https://fast.feibisi.com/https://github.com/wp-cli/scaffold-command.git
synced 2025-10-04 17:01:28 +08:00
add tests for themes
This commit is contained in:
parent
257c3ec5d6
commit
c2781c052d
1 changed files with 26 additions and 0 deletions
|
@ -54,6 +54,19 @@ Feature: WordPress code scaffolding
|
|||
Success: Network enabled the 'Zombieland' theme.
|
||||
"""
|
||||
|
||||
Scenario: Scaffold a child theme with invalid slug
|
||||
Given a WP install
|
||||
When I try `wp scaffold child-theme . --parent_theme=simple-life`
|
||||
Then STDERR should contain:
|
||||
"""
|
||||
Error: Invalid theme slug specified.
|
||||
"""
|
||||
When I try `wp scaffold child-theme ../ --parent_theme=simple-life`
|
||||
Then STDERR should contain:
|
||||
"""
|
||||
Error: Invalid theme slug specified.
|
||||
"""
|
||||
|
||||
@tax @cpt
|
||||
Scenario: Scaffold a Custom Taxonomy and Custom Post Type and write it to active theme
|
||||
Given a WP install
|
||||
|
@ -316,6 +329,19 @@ Feature: WordPress code scaffolding
|
|||
Success: Switched to 'Starter-theme' theme.
|
||||
"""
|
||||
|
||||
Scenario: Scaffold starter code for a theme with invalid slug
|
||||
Given a WP install
|
||||
When I try `wp scaffold _s .`
|
||||
Then STDERR should contain:
|
||||
"""
|
||||
Error: Invalid theme slug specified.
|
||||
"""
|
||||
When I try `wp scaffold _s ../`
|
||||
Then STDERR should contain:
|
||||
"""
|
||||
Error: Invalid theme slug specified.
|
||||
"""
|
||||
|
||||
Scenario: Scaffold plugin and tests for non-standard plugin directory
|
||||
Given a WP install
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue