From c2781c052d5d022240e4bd13d15c75ef26a13cf1 Mon Sep 17 00:00:00 2001 From: miya0001 Date: Thu, 15 Dec 2016 15:23:42 +0900 Subject: [PATCH] add tests for themes --- features/scaffold.feature | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/features/scaffold.feature b/features/scaffold.feature index 34d655eb..ceaab08b 100644 --- a/features/scaffold.feature +++ b/features/scaffold.feature @@ -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