From: jmslbam Date: Mon, 22 Apr 2013 22:50:10 +0000 (+0200) Subject: Added CPT and TAX --flags test and TAX --theme test X-Git-Tag: v0.10.0~54^2~13 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5ad115079538d63bb17c9d6f248821265df61bd9;p=wvm%2Fwvm.git Added CPT and TAX --flags test and TAX --theme test --- diff --git a/features/scaffold.feature b/features/scaffold.feature index 5c966f08..616ebfad 100644 --- a/features/scaffold.feature +++ b/features/scaffold.feature @@ -1,15 +1,64 @@ Feature: Wordpress code scaffolding - - Scenario: Scaffold a Custom Post Type - Given a WP install - When I run `wp scaffold post-type zombie` - Then it should run without errors - And STDOUT should contain: + Scenario: Scaffold a Custom Taxonomy and write it to active theme + Given a WP install + + When I run `wp scaffold taxonomy zombie-speed --theme` + Then it should run without errors + + When I run `wp option get stylesheet` + Then it should run without errors + And save STDOUT as {ACTIVE_THEME} + + #And the wp-content/{ACTIVE_THEME}/taxonomy/zombie-speed.php file should exist + And the wp-content/themes/twentytwelve/taxonomies/zombie-speed.php file should exist + + # Test for all flags but --label, --theme, --plugin and --raw + Scenario: Scaffold a Custom Taxonomy and attach it to a CPT zombie that is prefixed and has a text domain + Given a WP install + + When I run `wp scaffold taxonomy zombie-speed --post_types="prefix-zombie" --textdomain=zombieland` + Then it should run without errors + And STDOUT should contain: + """ + __( 'Zombie speeds' + """ + And STDOUT should contain: + """ + array( 'prefix-zombie' ) + """ + And STDOUT should contain: + """ + __( 'Zombie speeds', 'zombieland' + """ + + Scenario: Scaffold a Custom Taxonomy with label "Speed" + Given a WP install + + When I run `wp scaffold taxonomy zombie-speed --label="Speed"` + Then it should run without errors + And STDOUT should contain: """ - __( 'Zombies' + __( 'Speed' """ - + + + + # Test for all flags but --label, --theme, --plugin and --raw + Scenario: Scaffold a Custom Post Type + Given a WP install + + When I run `wp scaffold post-type zombie --textdomain=zombieland` + Then it should run without errors + And STDOUT should contain: + """ + __( 'Zombies' + """ + And STDOUT should contain: + """ + __( 'Zombies', 'zombieland' + """ + Scenario: Scaffold a Custom Post Type with label Given a WP install