Skip to content

Commit 1dbb59e

Browse files
authored
Merge pull request #97 from petitphp/fix/failing-tests-wp66
2 parents 205c004 + 3da7d64 commit 1dbb59e

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

features/transient.feature

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ Feature: Manage WordPress transient cache
5757

5858
Scenario: Deleting all transients on single site
5959
Given a WP install
60+
# We set `WP_DEVELOPMENT_MODE` to stop WordPress from automatically creating
61+
# additional transients which cause some steps to fail when testing.
62+
And I run `wp config set WP_DEVELOPMENT_MODE all`
6063
And I run `wp transient list --format=count`
6164
And save STDOUT as {EXISTING_TRANSIENTS}
6265
And I run `expr {EXISTING_TRANSIENTS} + 2`
@@ -193,6 +196,9 @@ Feature: Manage WordPress transient cache
193196

194197
Scenario: Deleting all transients on multisite
195198
Given a WP multisite install
199+
# We set `WP_DEVELOPMENT_MODE` to stop WordPress from automatically creating
200+
# additional transients which cause some steps to fail when testing.
201+
And I run `wp config set WP_DEVELOPMENT_MODE all`
196202
And I run `wp site create --slug=foo`
197203
And I run `wp transient list --format=count`
198204
And save STDOUT as {EXISTING_TRANSIENTS}
@@ -420,16 +426,24 @@ Feature: Manage WordPress transient cache
420426
"""
421427

422428
When I run `wp transient list --network --format=csv`
423-
Then STDOUT should be:
429+
Then STDOUT should contain:
424430
"""
425-
name,value,expiration
426431
foo4,bar4,false
432+
"""
433+
And STDOUT should contain:
434+
"""
427435
foo5,bar5,95649119999
436+
"""
437+
And STDOUT should contain:
438+
"""
428439
foo6,bar6,1321009871
429440
"""
430441

431442
Scenario: List transients on multisite
432443
Given a WP multisite install
444+
# We set `WP_DEVELOPMENT_MODE` to stop WordPress from automatically creating
445+
# additional transients which cause some steps to fail when testing.
446+
And I run `wp config set WP_DEVELOPMENT_MODE all`
433447
And I run `wp transient set foo bar`
434448
And I run `wp transient set foo2 bar2 610`
435449
And I run `wp option update _transient_timeout_foo2 95649119999`
@@ -465,11 +479,16 @@ Feature: Manage WordPress transient cache
465479
"""
466480

467481
When I run `wp transient list --network --format=csv`
468-
Then STDOUT should be:
482+
Then STDOUT should contain:
469483
"""
470-
name,value,expiration
471484
foo4,bar4,false
485+
"""
486+
And STDOUT should contain:
487+
"""
472488
foo5,bar5,95649119999
489+
"""
490+
And STDOUT should contain:
491+
"""
473492
foo6,bar6,1321009871
474493
"""
475494

0 commit comments

Comments
 (0)