Skip to content

Commit a7cf9aa

Browse files
committed
Fix tests for changes in WP Core 5.3
1 parent dc0f8e4 commit a7cf9aa

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

features/db-check.feature

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@ Feature: Check the database
5050
"""
5151
And STDOUT should be empty
5252

53-
# Verbose option prints to STDERR.
5453
When I try `wp db check --dbuser=wp_cli_test --verbose`
5554
Then the return code should be 0
56-
And STDERR should contain:
57-
"""
58-
Connecting
59-
"""
6055
And STDOUT should contain:
6156
"""
6257
Success: Database checked.

features/db-tables.feature

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ Feature: List database tables
4040
Given a WP multisite install
4141

4242
When I run `wp db tables`
43-
Then STDOUT should contain:
44-
"""
45-
wp_blog_versions
46-
"""
43+
# Leave out wp_blog_versions, it was never used and removed in WP 5.3+.
4744
# Leave out wp_blogmeta for old WP compat.
4845
And STDOUT should contain:
4946
"""

features/db.feature

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ Feature: Perform database operations
4949
Then the return code should be 1
5050

5151
When I run `wp db drop < session_no`
52-
Then STDOUT should be:
52+
# Check for contains only, as the string contains a trailing space.
53+
Then STDOUT should contain:
5354
"""
54-
Are you sure you want to drop the 'wp_cli_test' database? [y/n]
55+
Are you sure you want to drop the 'wp_cli_test' database? [y/n]
5556
"""
5657
5758
When I run `wp db reset < session_yes`
@@ -178,13 +179,8 @@ Feature: Perform database operations
178179
"""
179180
And STDOUT should be empty
180181
181-
# Verbose option prints to STDERR.
182182
When I try `wp db optimize --verbose`
183183
Then the return code should be 0
184-
And STDERR should contain:
185-
"""
186-
Connecting
187-
"""
188184
And STDOUT should not be empty
189185
190186
When I run `wp db repair --dbpass=password1`

null

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Processing databases
2+
wp_cli_test
3+
wp_cli_test.wp_commentmeta OK
4+
wp_cli_test.wp_comments OK
5+
wp_cli_test.wp_links OK
6+
wp_cli_test.wp_options OK
7+
wp_cli_test.wp_postmeta OK
8+
wp_cli_test.wp_posts OK
9+
wp_cli_test.wp_term_relationships OK
10+
wp_cli_test.wp_term_taxonomy OK
11+
wp_cli_test.wp_termmeta OK
12+
wp_cli_test.wp_terms OK
13+
wp_cli_test.wp_usermeta OK
14+
wp_cli_test.wp_users OK

0 commit comments

Comments
 (0)