Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"wp-cli/extension-command": "^1.2 || ^2 || ^3",
"wp-cli/media-command": "^1.1 || ^2 || ^3",
"wp-cli/super-admin-command": "^1 || ^2 || ^3",
"wp-cli/wp-cli-tests": "^5"
"wp-cli/wp-cli-tests": "dev-set-options-step as 5.3.99"
},
"config": {
"process-timeout": 7200,
Expand Down
34 changes: 21 additions & 13 deletions features/option-list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ Feature: List WordPress options

Scenario: List option with exclude pattern
Given a WP install
And these options:
| name | value |
| sample_test_field_one | sample_test_field_value_one |
| sample_test_field_two | sample_test_field_value_two |

When I run `wp option add sample_test_field_one sample_test_field_value_one`
And I run `wp option add sample_test_field_two sample_test_field_value_two`
And I run `wp option list --search="sample_test_field_*" --format=csv`
When I run `wp option list --search="sample_test_field_*" --format=csv`
Then STDOUT should be:
"""
option_name,option_value
Expand Down Expand Up @@ -93,8 +95,10 @@ Feature: List WordPress options

Scenario: List option with sorting option
Given a WP install
And I run `wp option add sample_test_field_one sample_test_field_value_one`
And I run `wp option add sample_test_field_two sample_test_field_value_two`
And these options:
| name | value |
| sample_test_field_one | sample_test_field_value_one |
| sample_test_field_two | sample_test_field_value_two |

When I run `wp option list --search="sample_test_field_*" --format=csv --orderby=option_id --order=asc`
Then STDOUT should be:
Expand Down Expand Up @@ -178,10 +182,12 @@ Feature: List WordPress options

Scenario: Using the `--autoload=on` flag
Given a WP install
And I run `wp option add sample_autoload_one 'sample_value_one' --autoload=yes`
And I run `wp option add sample_autoload_two 'sample_value_two' --autoload=no`
And I run `wp option add sample_autoload_three 'sample_value_three' --autoload=on`
And I run `wp option add sample_autoload_four 'sample_value_four' --autoload=off`
And these options:
| name | value | autoload |
| sample_autoload_one | sample_value_one | yes |
| sample_autoload_two | sample_value_two | no |
| sample_autoload_three | sample_value_three | on |
| sample_autoload_four | sample_value_four | off |

When I run `wp option list --autoload=on`
Then STDOUT should not contain:
Expand All @@ -203,10 +209,12 @@ Feature: List WordPress options

Scenario: Using the `--autoload=off` flag
Given a WP install
And I run `wp option add sample_autoload_one 'sample_value_one' --autoload=yes`
And I run `wp option add sample_autoload_two 'sample_value_two' --autoload=no`
And I run `wp option add sample_autoload_three 'sample_value_three' --autoload=on`
And I run `wp option add sample_autoload_four 'sample_value_four' --autoload=off`
And these options:
| name | value | autoload |
| sample_autoload_one | sample_value_one | yes |
| sample_autoload_two | sample_value_two | no |
| sample_autoload_three | sample_value_three | on |
| sample_autoload_four | sample_value_four | off |

When I run `wp option list --autoload=off`
Then STDOUT should not contain:
Expand Down
Loading