@@ -33,6 +33,8 @@ Feature: Manage WordPress plugins
3333 """
3434 The 'zombieLand' plugin could not be found.
3535 """
36+ And STDOUT should be empty
37+ And the return code should be 1
3638
3739 # Check that the inner-plugin is not picked up
3840 When I run `mv {PLUGIN_DIR}/plugin1 {PLUGIN_DIR}/Zombieland/`
@@ -69,6 +71,12 @@ Feature: Manage WordPress plugins
6971 """
7072 The 'Zombieland' plugin is active.
7173 """
74+ And STDERR should contain:
75+ """
76+ Error: No plugins uninstalled.
77+ """
78+ And STDOUT should be empty
79+ And the return code should be 1
7280
7381 When I run `wp plugin deactivate Zombieland`
7482 Then STDOUT should not be empty
@@ -88,10 +96,15 @@ Feature: Manage WordPress plugins
8896 And the {PLUGIN_DIR}/zombieland file should not exist
8997
9098 When I try the previous command again
91- Then STDERR should contain:
99+ Then STDERR should be:
100+ """
101+ Warning: The 'Zombieland' plugin could not be found.
102+ """
103+ And STDOUT should be:
92104 """
93- The 'Zombieland' plugin could not be found .
105+ Success: Plugin already uninstalled .
94106 """
107+ And the return code should be 0
95108
96109 Scenario : Install a plugin, activate, then force install an older version of the plugin
97110 Given a WP install
@@ -124,6 +137,8 @@ Feature: Manage WordPress plugins
124137 """
125138 Error: Please specify one or more plugins, or use --all.
126139 """
140+ And STDOUT should be empty
141+ And the return code should be 1
127142
128143 When I run `wp plugin update --all --format=summary | grep 'updated successfully from' `
129144 Then STDOUT should contain:
@@ -144,6 +159,7 @@ Feature: Manage WordPress plugins
144159 """
145160 Error: No plugins updated.
146161 """
162+ And the return code should be 1
147163
148164 When I run `wp plugin install wordpress-importer --version=0.5 --force`
149165 Then STDOUT should not be empty
@@ -157,6 +173,7 @@ Feature: Manage WordPress plugins
157173 """
158174 Error: Only updated 1 of 3 plugins.
159175 """
176+ And the return code should be 1
160177
161178 Scenario : Activate a network-only plugin on single site
162179 Given a WP install
@@ -215,7 +232,7 @@ Feature: Manage WordPress plugins
215232 | name | status |
216233 | akismet | active |
217234
218- When I run `wp plugin activate akismet`
235+ When I try `wp plugin activate akismet`
219236 Then STDERR should contain:
220237 """
221238 Warning: Plugin 'akismet' is already active.
@@ -224,6 +241,7 @@ Feature: Manage WordPress plugins
224241 """
225242 Success: Plugin already activated.
226243 """
244+ And the return code should be 0
227245
228246 When I run `wp plugin activate akismet --network`
229247 Then STDOUT should be:
@@ -232,7 +250,7 @@ Feature: Manage WordPress plugins
232250 Success: Network activated 1 of 1 plugins.
233251 """
234252
235- When I run `wp plugin activate akismet --network`
253+ When I try `wp plugin activate akismet --network`
236254 Then STDERR should be:
237255 """
238256 Warning: Plugin 'akismet' is already network active.
@@ -241,13 +259,15 @@ Feature: Manage WordPress plugins
241259 """
242260 Success: Plugin already network activated.
243261 """
262+ And the return code should be 0
244263
245264 When I try `wp plugin deactivate akismet`
246265 Then STDERR should be:
247266 """
248267 Warning: Plugin 'akismet' is network active and must be deactivated with --network flag.
249268 Error: No plugins deactivated.
250269 """
270+ And STDOUT should be empty
251271 And the return code should be 1
252272
253273 When I run `wp plugin deactivate akismet --network`
@@ -258,7 +278,7 @@ Feature: Manage WordPress plugins
258278 """
259279 And the return code should be 0
260280
261- When I run `wp plugin deactivate akismet`
281+ When I try `wp plugin deactivate akismet`
262282 Then STDERR should be:
263283 """
264284 Warning: Plugin 'akismet' isn't active.
@@ -375,6 +395,8 @@ Feature: Manage WordPress plugins
375395 """
376396 Error: The 'wordpress-importer' plugin could not be found.
377397 """
398+ And STDOUT should be empty
399+ And the return code should be 1
378400
379401 Scenario : Deactivate and uninstall a plugin, part two
380402 Given a WP install
@@ -397,7 +419,8 @@ Feature: Manage WordPress plugins
397419 """
398420 Error: The 'wordpress-importer' plugin could not be found.
399421 """
400-
422+ And STDOUT should be empty
423+ And the return code should be 1
401424
402425 Scenario : Uninstall a plugin without deleting
403426 Given a WP install
@@ -465,7 +488,7 @@ Feature: Manage WordPress plugins
465488 Scenario : Ignore empty slugs
466489 Given a WP install
467490
468- When I run `wp plugin install '' `
491+ When I try `wp plugin install '' `
469492 Then STDERR should contain:
470493 """
471494 Warning: Ignoring ambigious empty slug value.
@@ -474,6 +497,7 @@ Feature: Manage WordPress plugins
474497 """
475498 Plugin installed successfully
476499 """
500+ And the return code should be 0
477501
478502 Scenario : Plugin hidden by "all_plugins" filter
479503 Given a WP install
0 commit comments