Skip to content

Commit e019ad4

Browse files
committed
add update_version as default field
1 parent 19f45ab commit e019ad4

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

features/plugin.feature

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Feature: Manage WordPress plugins
6363

6464
When I run `wp plugin list`
6565
Then STDOUT should be a table containing rows:
66-
| name | status | update | version |
67-
| Zombieland | active | none | 0.1.0 |
66+
| name | status | update | version | update_version |
67+
| Zombieland | active | none | 0.1.0 | |
6868

6969
When I try `wp plugin uninstall Zombieland`
7070
Then STDERR should be:
@@ -131,8 +131,8 @@ Feature: Manage WordPress plugins
131131

132132
When I run `wp plugin list`
133133
Then STDOUT should be a table containing rows:
134-
| name | status | update | version |
135-
| wordpress-importer | active | available | 0.5 |
134+
| name | status | update | version | update_version |
135+
| wordpress-importer | active | available | 0.5 | {UPDATE_VERSION} |
136136

137137
When I try `wp plugin update`
138138
Then STDERR should be:
@@ -648,11 +648,14 @@ Feature: Manage WordPress plugins
648648

649649
When I run `wp plugin list --name=hello-dolly --field=version`
650650
And save STDOUT as {PLUGIN_VERSION}
651+
652+
When I run `wp plugin list --name=hello-dolly --field=update_version`
653+
And save STDOUT as {UPDATE_VERSION}
651654

652655
When I run `wp plugin list`
653656
Then STDOUT should be a table containing rows:
654-
| name | status | update | version |
655-
| hello-dolly | inactive | version higher than expected | {PLUGIN_VERSION} |
657+
| name | status | update | version | update_version |
658+
| hello-dolly | inactive | version higher than expected | {PLUGIN_VERSION} | {UPDATE_VERSION} |
656659

657660
When I try `wp plugin update --all`
658661
Then STDERR should be:

src/Plugin_Command.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
5252
'status',
5353
'update',
5454
'version',
55+
'update_version',
5556
);
5657

5758
/**

0 commit comments

Comments
 (0)