Skip to content

Commit

Permalink
update patch feature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petitphp committed Jul 1, 2023
1 parent eef8e56 commit 8787b05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions features/cache.feature
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ Feature: Managed the WordPress object cache
When I run `wp cache supports set_multiple`
Then the return code should be 0

Scenario: Nested values can be retrieved at any depth.
Scenario: Nested values from cache can be retrieved at any depth.
Given a WP install
And a wp-content/mu-plugins/test-harness.php file:
"""
<?php
$set_foo = function(){
wp_cache_set( 'my_key', ['foo' => 'bar'] );
wp_cache_set( 'my_key_2', ['foo' => ['bar' => 'baz']] );
wp_cache_set( 'my_key_custom', ['foo_custom' => ['bar_custom' => 'baz_custom']], 'my_custom_group' );
wp_cache_set( 'my_key_3', ['foo' => 'bar_custom'], 'my_custom_group' );
};
WP_CLI::add_hook( 'before_invoke:cache pluck', $set_foo );
Expand All @@ -237,8 +237,8 @@ Feature: Managed the WordPress object cache
baz
"""

When I try `wp cache pluck my_key_custom foo_custom bar_custom --group=my_custom_group`
When I try `wp cache pluck my_key_3 foo --group=my_custom_group`
Then STDOUT should be:
"""
baz_custom
bar_custom
"""

0 comments on commit 8787b05

Please sign in to comment.