Skip to content

Commit 57f96b6

Browse files
committed
Adding new scenario.
1 parent e8c73d5 commit 57f96b6

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

features/db.feature

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ Feature: Perform database operations
104104
"""
105105
And STDOUT should be empty
106106
107-
When I run `wp db import /tmp/wp-cli-behat.sql`
108-
Then STDOUT should contain:
109-
"""
110-
Success: Imported
111-
"""
107+
Scenario: Clean up a WordPress install without dropping its database entirely but tables with prefix.
108+
Given a WP install
109+
110+
When I run `wp db query "create table custom_table as select * from wp_users;"`
111+
Then STDOUT should be empty
112+
And the return code should be 0
112113
113114
When I run `wp db clean --yes --dbuser=wp_cli_test --dbpass=password1`
114115
Then STDOUT should be:
@@ -124,6 +125,13 @@ Feature: Perform database operations
124125
"""
125126
And STDOUT should be empty
126127
128+
When I run `wp db tables --all-tables`
129+
Then STDOUT should be:
130+
"""
131+
custom_table
132+
"""
133+
And the return code should be 0
134+
127135
Scenario: DB Operations
128136
Given a WP install
129137

0 commit comments

Comments
 (0)