Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add update_version as default field
  • Loading branch information
sejas committed Nov 10, 2023
commit e019ad4810418590ca02edf699209cc42d735a2f
15 changes: 9 additions & 6 deletions features/plugin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Feature: Manage WordPress plugins

When I run `wp plugin list`
Then STDOUT should be a table containing rows:
| name | status | update | version |
| Zombieland | active | none | 0.1.0 |
| name | status | update | version | update_version |
| Zombieland | active | none | 0.1.0 | |

When I try `wp plugin uninstall Zombieland`
Then STDERR should be:
Expand Down Expand Up @@ -131,8 +131,8 @@ Feature: Manage WordPress plugins

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

When I try `wp plugin update`
Then STDERR should be:
Expand Down Expand Up @@ -648,11 +648,14 @@ Feature: Manage WordPress plugins

When I run `wp plugin list --name=hello-dolly --field=version`
And save STDOUT as {PLUGIN_VERSION}

When I run `wp plugin list --name=hello-dolly --field=update_version`
And save STDOUT as {UPDATE_VERSION}

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

When I try `wp plugin update --all`
Then STDERR should be:
Expand Down
1 change: 1 addition & 0 deletions src/Plugin_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
'status',
'update',
'version',
'update_version',
);

/**
Expand Down