Skip to content

Commit be15fc6

Browse files
committed
Further improve tests
1 parent e675b11 commit be15fc6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

features/transient.feature

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ Feature: Manage WordPress transient cache
194194
Scenario: Deleting all transients on multisite
195195
Given a WP multisite install
196196
And I run `wp site create --slug=foo`
197+
And I run `wp transient list --format=count`
198+
And save STDOUT as {EXISTING_TRANSIENTS}
199+
And I run `expr {EXISTING_TRANSIENTS} + 2`
200+
And save STDOUT as {EXPECTED_TRANSIENTS}
197201

198202
When I try `wp transient delete`
199203
Then STDERR should be:
@@ -210,7 +214,7 @@ Feature: Manage WordPress transient cache
210214
And I run `wp transient delete --all`
211215
Then STDOUT should be:
212216
"""
213-
Success: 2 transients deleted from the database.
217+
Success: {EXPECTED_TRANSIENTS} transients deleted from the database.
214218
"""
215219

216220
When I try `wp transient get foo`
@@ -393,7 +397,7 @@ Feature: Manage WordPress transient cache
393397
And I run `wp option update _site_transient_timeout_foo6 1321009871`
394398

395399
When I run `wp transient list --format=csv`
396-
Then STDOUT should be:
400+
Then STDOUT should contain:
397401
"""
398402
name,value,expiration
399403
foo,bar,false
@@ -438,7 +442,7 @@ Feature: Manage WordPress transient cache
438442
And I run `wp site option update _site_transient_timeout_foo6 1321009871`
439443

440444
When I run `wp transient list --format=csv`
441-
Then STDOUT should be:
445+
Then STDOUT should contain:
442446
"""
443447
name,value,expiration
444448
foo,bar,false

0 commit comments

Comments
 (0)