Skip to content

Commit cbc6d41

Browse files
committed
Add tests for table prefix
1 parent de52bfc commit cbc6d41

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

features/config-create.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,22 @@ Feature: Create a wp-config file
119119
define( 'AUTH_SALT',
120120
"""
121121
122+
Scenario: Configure with invalid table prefix
123+
Given an empty directory
124+
And WP files
125+
126+
When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=sompassword --dbprefix=""`
127+
Then the return code should be 1
128+
And STDERR should not be empty
129+
130+
When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=sompassword --dbprefix=" "`
131+
Then the return code should be 1
132+
And STDERR should not be empty
133+
134+
When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=sompassword --dbprefix="wp-"`
135+
Then the return code should be 1
136+
And STDERR should not be empty
137+
122138
@require-php-7.0
123139
Scenario: Configure with salts generated
124140
Given an empty directory

0 commit comments

Comments
 (0)