Skip to content

Commit fb3c95e

Browse files
committed
Disable WP-CRON when testing transient deletion
1 parent 4414ef1 commit fb3c95e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

features/transient.feature

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Feature: Manage WordPress transient cache
6060
# We set `WP_DEVELOPMENT_MODE` to stop WordPress from automatically creating
6161
# additional transients which cause some steps to fail when testing.
6262
And I run `wp config set WP_DEVELOPMENT_MODE all`
63+
And I run `wp config set DISABLE_WP_CRON true --raw`
64+
6365
And I run `wp transient list --format=count`
6466
And save STDOUT as {EXISTING_TRANSIENTS}
6567
And I run `expr {EXISTING_TRANSIENTS} + 2`
@@ -75,6 +77,7 @@ Feature: Manage WordPress transient cache
7577
And I run `wp transient set foo2 bar2 600`
7678
And I run `wp transient set foo3 bar3 --network`
7779
And I run `wp transient set foo4 bar4 600 --network`
80+
7881
And I run `wp transient delete --all`
7982
Then STDOUT should be:
8083
"""

0 commit comments

Comments
 (0)