Skip to content

Commit d28445f

Browse files
petitphpschlessera
authored andcommitted
Use wp eval to set the transient
1 parent b74bc47 commit d28445f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

features/transient-patch.feature

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,8 @@ Feature: Patch command available for the transient cache
22

33
Scenario: Nested values from transient can be updated at any depth.
44
Given a WP install
5-
And a wp-content/mu-plugins/test-harness.php file:
6-
"""php
7-
<?php
8-
$set_foo = function(){
9-
set_transient( 'my_key', ['foo' => 'bar'] );
10-
set_transient( 'my_key_2', ['foo' => ['bar' => 'baz']] );
11-
};
12-
13-
WP_CLI::add_hook( 'before_invoke:transient patch', $set_foo );
14-
"""
5+
And I run `wp eval "set_transient( 'my_key', ['foo' => 'bar'] );"`
6+
And I run `wp eval "set_transient( 'my_key_2', ['foo' => ['bar' => 'baz']] );"`
157

168
When I run `wp transient patch insert my_key fuz baz`
179
Then STDOUT should be:

0 commit comments

Comments
 (0)