@@ -73,10 +73,12 @@ Feature: Manage WordPress transient cache
7373 Error: Please specify transient key, or use --all or --expired.
7474 """
7575
76- When I run `wp transient set foo bar`
77- And I run `wp transient set foo2 bar2 600`
78- And I run `wp transient set foo3 bar3 --network`
79- And I run `wp transient set foo4 bar4 600 --network`
76+ Given these setup commands:
77+ | command |
78+ | wp transient set foo bar |
79+ | wp transient set foo2 bar2 600 |
80+ | wp transient set foo3 bar3 --network |
81+ | wp transient set foo4 bar4 600 --network |
8082
8183 And I run `wp transient delete --all`
8284 Then STDOUT should be:
@@ -129,13 +131,17 @@ Feature: Manage WordPress transient cache
129131 @skip-object-cache
130132 Scenario : Deleting expired transients on single site
131133 Given a WP install
132- And I run `wp transient set foo bar 600`
133- And I run `wp transient set foo2 bar2 600`
134- And I run `wp transient set foo3 bar3 600 --network`
135- And I run `wp transient set foo4 bar4 600 --network`
134+ And these setup commands:
135+ | command |
136+ | wp transient set foo bar 600 |
137+ | wp transient set foo2 bar2 600 |
138+ | wp transient set foo3 bar3 600 --network |
139+ | wp transient set foo4 bar4 600 --network |
136140 # Change timeout to be in the past.
137- And I run `wp option update _transient_timeout_foo 1321009871`
138- And I run `wp option update _site_transient_timeout_foo3 1321009871`
141+ And these setup commands:
142+ | command |
143+ | wp option update _transient_timeout_foo 1321009871 |
144+ | wp option update _site_transient_timeout_foo3 1321009871 |
139145
140146 When I run `wp transient delete --expired`
141147 Then STDOUT should be:
@@ -216,13 +222,15 @@ Feature: Manage WordPress transient cache
216222 Error: Please specify transient key, or use --all or --expired.
217223 """
218224
219- When I run `wp transient set foo bar`
220- And I run `wp transient set foo2 bar2 600`
221- And I run `wp transient set foo3 bar3 --network`
222- And I run `wp transient set foo4 bar4 600 --network`
223- And I run `wp --url=example.com/foo transient set foo5 bar5 --network`
224- And I run `wp --url=example.com/foo transient set foo6 bar6 600 --network`
225- And I run `wp transient delete --all`
225+ Given these setup commands:
226+ | command |
227+ | wp transient set foo bar |
228+ | wp transient set foo2 bar2 600 |
229+ | wp transient set foo3 bar3 --network |
230+ | wp transient set foo4 bar4 600 --network |
231+ | wp --url =example .com /foo transient set foo5 bar5 --network |
232+ | wp --url =example .com /foo transient set foo6 bar6 600 --network |
233+ When I run `wp transient delete --all`
226234 Then STDOUT should be:
227235 """
228236 Success: {EXPECTED_TRANSIENTS} transients deleted from the database.
@@ -298,16 +306,20 @@ Feature: Manage WordPress transient cache
298306 Scenario : Deleting expired transients on multisite
299307 Given a WP multisite install
300308 And I run `wp site create --slug=foo`
301- And I run `wp transient set foo bar 600`
302- And I run `wp transient set foo2 bar2 600`
303- And I run `wp transient set foo3 bar3 600 --network`
304- And I run `wp transient set foo4 bar4 600 --network`
305- And I run `wp --url=example.com/foo transient set foo5 bar5 600 --network`
306- And I run `wp --url=example.com/foo transient set foo6 bar6 600 --network`
309+ And these setup commands:
310+ | command |
311+ | wp transient set foo bar 600 |
312+ | wp transient set foo2 bar2 600 |
313+ | wp transient set foo3 bar3 600 --network |
314+ | wp transient set foo4 bar4 600 --network |
315+ | wp --url =example .com /foo transient set foo5 bar5 600 --network |
316+ | wp --url =example .com /foo transient set foo6 bar6 600 --network |
307317 # Change timeout to be in the past.
308- And I run `wp option update _transient_timeout_foo 1321009871`
309- And I run `wp site option update _site_transient_timeout_foo3 1321009871`
310- And I run `wp --url=example.com/foo site option update _site_transient_timeout_foo5 1321009871`
318+ And these setup commands:
319+ | command |
320+ | wp option update _transient_timeout_foo 1321009871 |
321+ | wp site option update _site_transient_timeout_foo3 1321009871 |
322+ | wp --url =example .com /foo site option update _site_transient_timeout_foo5 1321009871 |
311323
312324 When I run `wp transient delete --expired`
313325 Then STDOUT should be:
@@ -398,16 +410,18 @@ Feature: Manage WordPress transient cache
398410 @skip-object-cache
399411 Scenario : List transients on single site
400412 Given a WP install
401- And I run `wp transient set foo bar`
402- And I run `wp transient set foo2 bar2 610`
403- And I run `wp option update _transient_timeout_foo2 95649119999`
404- And I run `wp transient set foo3 bar3 300`
405- And I run `wp option update _transient_timeout_foo3 1321009871`
406- And I run `wp transient set foo4 bar4 --network`
407- And I run `wp transient set foo5 bar5 610 --network`
408- And I run `wp option update _site_transient_timeout_foo5 95649119999`
409- And I run `wp transient set foo6 bar6 300 --network`
410- And I run `wp option update _site_transient_timeout_foo6 1321009871`
413+ And these setup commands:
414+ | command |
415+ | wp transient set foo bar |
416+ | wp transient set foo2 bar2 610 |
417+ | wp option update _transient_timeout_foo2 95649119999 |
418+ | wp transient set foo3 bar3 300 |
419+ | wp option update _transient_timeout_foo3 1321009871 |
420+ | wp transient set foo4 bar4 --network |
421+ | wp transient set foo5 bar5 610 --network |
422+ | wp option update _site_transient_timeout_foo5 95649119999 |
423+ | wp transient set foo6 bar6 300 --network |
424+ | wp option update _site_transient_timeout_foo6 1321009871 |
411425
412426 When I run `wp transient list --format=csv`
413427 Then STDOUT should contain:
@@ -457,16 +471,18 @@ Feature: Manage WordPress transient cache
457471 # We set `WP_DEVELOPMENT_MODE` to stop WordPress from automatically creating
458472 # additional transients which cause some steps to fail when testing.
459473 And I run `wp config set WP_DEVELOPMENT_MODE all`
460- And I run `wp transient set foo bar`
461- And I run `wp transient set foo2 bar2 610`
462- And I run `wp option update _transient_timeout_foo2 95649119999`
463- And I run `wp transient set foo3 bar3 300`
464- And I run `wp option update _transient_timeout_foo3 1321009871`
465- And I run `wp transient set foo4 bar4 --network`
466- And I run `wp transient set foo5 bar5 610 --network`
467- And I run `wp site option update _site_transient_timeout_foo5 95649119999`
468- And I run `wp transient set foo6 bar6 300 --network`
469- And I run `wp site option update _site_transient_timeout_foo6 1321009871`
474+ And these setup commands:
475+ | command |
476+ | wp transient set foo bar |
477+ | wp transient set foo2 bar2 610 |
478+ | wp option update _transient_timeout_foo2 95649119999 |
479+ | wp transient set foo3 bar3 300 |
480+ | wp option update _transient_timeout_foo3 1321009871 |
481+ | wp transient set foo4 bar4 --network |
482+ | wp transient set foo5 bar5 610 --network |
483+ | wp site option update _site_transient_timeout_foo5 95649119999 |
484+ | wp transient set foo6 bar6 300 --network |
485+ | wp site option update _site_transient_timeout_foo6 1321009871 |
470486
471487 When I run `wp transient list --format=csv`
472488 Then STDOUT should contain:
@@ -513,11 +529,13 @@ Feature: Manage WordPress transient cache
513529 @skip-object-cache
514530 Scenario : List transients with search and exclude pattern
515531 Given a WP install
516- And I run `wp transient set foo bar`
517- And I run `wp transient set foo2 bar2`
518- And I run `wp transient set foo3 bar3`
519- And I run `wp transient set foo4 bar4 --network`
520- And I run `wp transient set foo5 bar5 --network`
532+ And these setup commands:
533+ | command |
534+ | wp transient set foo bar |
535+ | wp transient set foo2 bar2 |
536+ | wp transient set foo3 bar3 |
537+ | wp transient set foo4 bar4 --network |
538+ | wp transient set foo5 bar5 --network |
521539
522540 When I run `wp transient list --format=csv --fields=name --search="foo" `
523541 Then STDOUT should be:
0 commit comments