Skip to content

Commit 814750b

Browse files
committed
When checking for expired transients, use the option as get_transient() will delete it
1 parent 62420f3 commit 814750b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

features/transient.feature

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ Feature: Manage WordPress transient cache
144144
bar2
145145
"""
146146

147-
When I run `wp transient get foo3 --network`
147+
# Check if option still exists as a get transient call will remove it.
148+
When I run `wp option get _site_transient_foo3`
148149
Then STDOUT should be:
149150
"""
150151
bar3
@@ -159,7 +160,7 @@ Feature: Manage WordPress transient cache
159160
When I run `wp transient delete --expired --network`
160161
Then STDOUT should be:
161162
"""
162-
Success: 1 expired transients deleted from the database.
163+
Success: 1 expired transient deleted from the database.
163164
"""
164165

165166
When I try `wp transient get foo`
@@ -306,7 +307,8 @@ Feature: Manage WordPress transient cache
306307
bar2
307308
"""
308309

309-
When I run `wp transient get foo3 --network`
310+
# Check if option still exists as a get transient call will remove it.
311+
When I run `wp site option get _site_transient_foo3`
310312
Then STDOUT should be:
311313
"""
312314
bar3
@@ -318,7 +320,8 @@ Feature: Manage WordPress transient cache
318320
bar4
319321
"""
320322

321-
When I run `wp --url=example.com/foo transient get foo5 --network`
323+
# Check if option still exists as a get transient call will remove it.
324+
When I run `wp --url=example.com/foo site option get _site_transient_foo5`
322325
Then STDOUT should be:
323326
"""
324327
bar5

0 commit comments

Comments
 (0)