Skip to content

Commit 4918d19

Browse files
committed
More fixes
1 parent 25a4276 commit 4918d19

File tree

5 files changed

+39
-12
lines changed

5 files changed

+39
-12
lines changed

features/plugin-activate.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ Feature: Activate WordPress plugins
5454
Then STDOUT should contain:
5555
"""
5656
Plugin 'akismet' activated.
57+
"""
58+
And STDOUT should not contain:
59+
"""
5760
Plugin 'sample-plugin' activated.
5861
"""
5962
And STDOUT should not contain:

features/plugin-deactivate.feature

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ Feature: Deactivate WordPress plugins
8080

8181
Scenario: Adding --exclude with plugin deactivate --all should exclude the plugins specified via --exclude
8282
When I try `wp plugin deactivate --all --exclude=sample-plugin`
83-
Then STDOUT should be:
83+
Then STDOUT should contain:
8484
"""
8585
Plugin 'akismet' deactivated.
86-
Success: Deactivated 1 of 1 plugins.
86+
"""
87+
And STDOUT should contain:
88+
"""
89+
Success: Deactivated 1 of 2 plugins.
8790
"""
8891
And the return code should be 0
8992

features/plugin-delete.feature

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ Feature: Delete WordPress plugins
1515

1616
Scenario: Delete all installed plugins
1717
When I run `wp plugin delete --all`
18-
Then STDOUT should be:
18+
Then STDOUT should contain:
1919
"""
2020
Deleted 'akismet' plugin.
21+
"""
22+
And STDOUT should contain:
23+
"""
2124
Deleted 'sample-plugin' plugin.
22-
Success: Deleted 2 of 2 plugins.
25+
"""
26+
And STDOUT should contain:
27+
"""
28+
Success: Deleted 3 of 3 plugins.
2329
"""
2430
And the return code should be 0
2531

@@ -42,7 +48,7 @@ Feature: Delete WordPress plugins
4248
And the return code should be 0
4349

4450
Scenario: Excluding a plugin from deletion when using --all switch
45-
When I try `wp plugin delete --all --exclude=akismet,sample-plugin`
51+
When I try `wp plugin delete --all --exclude=akismet,sample-plugin,hello,hello-dolly`
4652
Then STDOUT should be:
4753
"""
4854
Success: No plugins deleted.

features/plugin-uninstall.feature

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,17 @@ Feature: Uninstall a WordPress plugin
8585

8686
Scenario: Uninstall all installed plugins
8787
When I run `wp plugin uninstall --all`
88-
Then STDOUT should be:
88+
Then STDOUT should contain:
8989
"""
9090
Uninstalled and deleted 'akismet' plugin.
91+
"""
92+
And STDOUT should contain:
93+
"""
9194
Uninstalled and deleted 'sample-plugin' plugin.
92-
Success: Uninstalled 2 of 2 plugins.
95+
"""
96+
And STDOUT should contain:
97+
"""
98+
Success: Uninstalled 3 of 3 plugins.
9399
"""
94100
And the return code should be 0
95101
And STDERR should be empty
@@ -105,14 +111,20 @@ Feature: Uninstall a WordPress plugin
105111
When I run `wp plugin activate --all`
106112
Then STDOUT should contain:
107113
"""
108-
Success: Activated 2 of 2 plugins.
114+
Success: Activated 3 of 3 plugins.
109115
"""
110116

111117
When I try `wp plugin uninstall --all`
112-
Then STDERR should be:
118+
Then STDERR should contain:
113119
"""
114120
Warning: The 'akismet' plugin is active.
121+
"""
122+
And STDERR should contain:
123+
"""
115124
Warning: The 'sample-plugin' plugin is active.
125+
"""
126+
And STDERR should contain:
127+
"""
116128
Error: No plugins uninstalled.
117129
"""
118130
And the return code should be 1
@@ -126,7 +138,7 @@ Feature: Uninstall a WordPress plugin
126138
And STDERR should be empty
127139

128140
Scenario: Excluding a plugin from uninstallation when using --all switch
129-
When I try `wp plugin uninstall --all --exclude=akismet,sample-plugin`
141+
When I try `wp plugin uninstall --all --exclude=akismet,sample-plugin,hello,hello-dolly`
130142
Then STDOUT should be:
131143
"""
132144
Success: No plugins uninstalled.

features/plugin.feature

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Feature: Manage WordPress plugins
301301
Scenario: List plugins
302302
Given a WP install
303303

304-
When I run `wp plugin activate akismet`
304+
When I run `wp plugin activate --all`
305305
Then STDOUT should not be empty
306306

307307
When I run `wp plugin list --status=inactive --field=name`
@@ -431,9 +431,12 @@ Feature: Manage WordPress plugins
431431
Then STDOUT should contain:
432432
"""
433433
Plugin 'akismet' activated.
434+
"""
435+
And STDOUT should contain:
436+
"""
434437
Plugin 'sample-plugin' activated.
435438
"""
436-
And STDOUT should not contain:
439+
And STDOUT should contain:
437440
"""
438441
Success: Activated 3 of 3 plugins.
439442
"""

0 commit comments

Comments
 (0)