Skip to content

Commit e0a353c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into patch-35
2 parents 822f94a + cfd2b7f commit e0a353c

2 files changed

Lines changed: 50 additions & 49 deletions

File tree

features/plugin-update.feature

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@ Feature: Update WordPress plugins
33
Scenario: Updating plugin with invalid version shouldn't remove the old version
44
Given a WP install
55

6-
When I run `wp plugin install akismet --version=2.5.6 --force`
6+
When I run `wp plugin install wordpress-importer --version=0.5 --force`
77
Then STDOUT should not be empty
88

9-
When I run `wp plugin list --name=akismet --field=update_version`
9+
When I run `wp plugin list --name=wordpress-importer --field=update_version`
1010
Then STDOUT should not be empty
1111
And save STDOUT as {UPDATE_VERSION}
1212

1313
When I run `wp plugin list`
1414
Then STDOUT should be a table containing rows:
15-
| name | status | update | version |
16-
| akismet | inactive | available | 2.5.6 |
15+
| name | status | update | version |
16+
| wordpress-importer | inactive | available | 0.5 |
1717

18-
When I try `wp plugin update akismet --version=2.9.0`
18+
When I try `wp plugin update akismet --version=0.5.3`
1919
Then STDERR should be:
2020
"""
21-
Error: Can't find the requested plugin's version 2.9.0 in the WordPress.org plugin repository (HTTP code 404).
21+
Error: Can't find the requested plugin's version 0.5.3 in the WordPress.org plugin repository (HTTP code 404).
2222
"""
2323

2424
When I run `wp plugin list`
2525
Then STDOUT should be a table containing rows:
26-
| name | status | update | version |
27-
| akismet | inactive | available | 2.5.6 |
26+
| name | status | update | version |
27+
| wordpress-importer | inactive | available | 0.5 |
2828

29-
When I run `wp plugin update akismet`
29+
When I run `wp plugin update wordpress-importer`
3030
Then STDOUT should not be empty
3131

3232
When I run `wp plugin list`
3333
Then STDOUT should be a table containing rows:
34-
| name | status | update | version |
35-
| akismet | inactive | none | {UPDATE_VERSION} |
34+
| name | status | update | version |
35+
| wordpress-importer | inactive | none | {UPDATE_VERSION} |
3636

3737
Scenario: Error when both --minor and --patch are provided
3838
Given a WP install
@@ -46,50 +46,51 @@ Feature: Update WordPress plugins
4646
Scenario: Exclude plugin updates from bulk updates.
4747
Given a WP install
4848

49-
When I run `wp plugin install akismet --version=3.0.0 --force`
49+
When I run `wp plugin install wordpress-importer --version=0.5 --force`
5050
Then STDOUT should contain:
5151
""""
5252
Downloading install
5353
""""
5454
And STDOUT should contain:
5555
""""
56-
package from https://downloads.wordpress.org/plugin/akismet.3.0.0.zip...
56+
package from https://downloads.wordpress.org/plugin/wordpress-importer.0.5.zip...
5757
""""
5858
59-
When I run `wp plugin status akismet`
59+
When I run `wp plugin status wordpress-importer`
6060
Then STDOUT should contain:
6161
""""
6262
Update available
6363
""""
6464
65-
When I run `wp plugin update --all --exclude=akismet | grep 'Skipped'`
65+
When I run `wp plugin update --all --exclude=wordpress-importer | grep 'Skipped'`
6666
Then STDOUT should contain:
6767
"""
68-
akismet
68+
wordpress-importer
6969
"""
7070
71-
When I run `wp plugin status akismet`
71+
When I run `wp plugin status wordpress-importer`
7272
Then STDOUT should contain:
7373
""""
7474
Update available
7575
""""
7676
7777
Scenario: Update a plugin to its latest patch release
7878
Given a WP install
79-
And I run `wp plugin install --force akismet --version=2.5.4`
79+
And I run `wp plugin install --force wordpress-importer --version=0.5`
8080
81-
When I run `wp plugin update akismet --patch`
81+
When I run `wp plugin update wordpress-importer --patch`
8282
Then STDOUT should contain:
8383
"""
8484
Success: Updated 1 of 1 plugins.
8585
"""
8686
87-
When I run `wp plugin get akismet --field=version`
87+
When I run `wp plugin get wordpress-importer --field=version`
8888
Then STDOUT should be:
8989
"""
90-
2.5.10
90+
0.5.2
9191
"""
9292
93+
@require-wp-4.0
9394
Scenario: Update a plugin to its latest minor release
9495
Given a WP install
9596
And I run `wp plugin install --force akismet --version=2.5.4`

features/plugin.feature

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,28 @@ Feature: Manage WordPress plugins
9696
Scenario: Install a plugin, activate, then force install an older version of the plugin
9797
Given a WP install
9898

99-
When I run `wp plugin install akismet --version=2.5.7 --force`
99+
When I run `wp plugin install wordpress-importer --version=0.5 --force`
100100
Then STDOUT should not be empty
101101

102-
When I run `wp plugin list --name=akismet --field=update_version`
102+
When I run `wp plugin list --name=wordpress-importer --field=update_version`
103103
Then STDOUT should not be empty
104104
And save STDOUT as {UPDATE_VERSION}
105105

106106
When I run `wp plugin list --fields=name,status,update,version,update_version`
107107
Then STDOUT should be a table containing rows:
108-
| name | status | update | version | update_version |
109-
| akismet | inactive | available | 2.5.7 | {UPDATE_VERSION} |
108+
| name | status | update | version | update_version |
109+
| wordpress-importer | inactive | available | 0.5 | {UPDATE_VERSION} |
110110

111-
When I run `wp plugin activate akismet`
111+
When I run `wp plugin activate wordpress-importer`
112112
Then STDOUT should not be empty
113113

114-
When I run `wp plugin install akismet --version=2.5.6 --force`
114+
When I run `wp plugin install wordpress-importer --version=0.5 --force`
115115
Then STDOUT should not be empty
116116

117117
When I run `wp plugin list`
118118
Then STDOUT should be a table containing rows:
119-
| name | status | update | version |
120-
| akismet | active | available | 2.5.6 |
119+
| name | status | update | version |
120+
| wordpress-importer | active | available | 0.5 |
121121

122122
When I try `wp plugin update`
123123
Then STDERR should be:
@@ -128,7 +128,7 @@ Feature: Manage WordPress plugins
128128
When I run `wp plugin update --all --format=summary | grep 'updated successfully from'`
129129
Then STDOUT should contain:
130130
"""
131-
Akismet updated successfully from version 2.5.6 to version
131+
WordPress Importer updated successfully from version 0.5 to version
132132
"""
133133

134134
When I try `wp plugin update xxx yyy`
@@ -145,10 +145,10 @@ Feature: Manage WordPress plugins
145145
Error: No plugins updated.
146146
"""
147147

148-
When I run `wp plugin install akismet --version=2.5.6 --force`
148+
When I run `wp plugin install wordpress-importer --version=0.5 --force`
149149
Then STDOUT should not be empty
150150

151-
When I try `wp plugin update akismet hello xxx`
151+
When I try `wp plugin update wordpress-importer hello xxx`
152152
Then STDERR should contain:
153153
"""
154154
Warning: The 'xxx' plugin could not be found.
@@ -290,13 +290,13 @@ Feature: Manage WordPress plugins
290290
And I run `if test -d wp-content/plugins; then echo "fail"; fi`
291291
Then STDOUT should be empty
292292

293-
When I run `wp plugin install akismet --activate`
293+
When I run `wp plugin install wordpress-importer --activate`
294294
Then STDOUT should not be empty
295295

296296
When I run `wp plugin list --status=active --fields=name,status`
297297
Then STDOUT should be a table containing rows:
298-
| name | status |
299-
| akismet | active |
298+
| name | status |
299+
| wordpress-importer | active |
300300

301301
Scenario: Plugin name with HTML entities
302302
Given a WP install
@@ -358,44 +358,44 @@ Feature: Manage WordPress plugins
358358
Given a WP install
359359
And these installed and active plugins:
360360
"""
361-
akismet
361+
wordpress-importer
362362
"""
363363

364-
When I run `wp plugin deactivate akismet --uninstall`
364+
When I run `wp plugin deactivate wordpress-importer --uninstall`
365365
Then STDOUT should be:
366366
"""
367-
Plugin 'akismet' deactivated.
368-
Uninstalling 'akismet'...
369-
Uninstalled and deleted 'akismet' plugin.
367+
Plugin 'wordpress-importer' deactivated.
368+
Uninstalling 'wordpress-importer'...
369+
Uninstalled and deleted 'wordpress-importer' plugin.
370370
Success: Deactivated 1 of 1 plugins.
371371
"""
372372

373-
When I try `wp plugin get akismet`
373+
When I try `wp plugin get wordpress-importer`
374374
Then STDERR should be:
375375
"""
376-
Error: The 'akismet' plugin could not be found.
376+
Error: The 'wordpress-importer' plugin could not be found.
377377
"""
378378

379379
Scenario: Deactivate and uninstall a plugin, part two
380380
Given a WP install
381381
And these installed and active plugins:
382382
"""
383-
akismet
383+
wordpress-importer
384384
"""
385385

386-
When I run `wp plugin uninstall akismet --deactivate`
386+
When I run `wp plugin uninstall wordpress-importer --deactivate`
387387
Then STDOUT should be:
388388
"""
389-
Deactivating 'akismet'...
390-
Plugin 'akismet' deactivated.
391-
Uninstalled and deleted 'akismet' plugin.
389+
Deactivating 'wordpress-importer'...
390+
Plugin 'wordpress-importer' deactivated.
391+
Uninstalled and deleted 'wordpress-importer' plugin.
392392
Success: Uninstalled 1 of 1 plugins.
393393
"""
394394

395-
When I try `wp plugin get akismet`
395+
When I try `wp plugin get wordpress-importer`
396396
Then STDERR should be:
397397
"""
398-
Error: The 'akismet' plugin could not be found.
398+
Error: The 'wordpress-importer' plugin could not be found.
399399
"""
400400

401401

0 commit comments

Comments
 (0)