@@ -163,20 +163,48 @@ Feature: Create a wp-config file
163163 Error: Database connection error
164164 """
165165
166+ Scenario: Missing --dbname with --skip-check
167+ Given an empty directory
168+ And WP files
169+
170+ When I run `wp config create --skip-check --dbuser=someuser`
171+ Then the wp-config.php file should contain:
172+ """
173+ define( 'DB_NAME', '' );
174+ """
175+ And the wp-config.php file should contain:
176+ """
177+ define( 'DB_USER', 'someuser' );
178+ """
179+
180+ Scenario: Missing --dbuser with --skip-check
181+ Given an empty directory
182+ And WP files
183+
184+ When I run `wp config create --skip-check --dbname=somedb`
185+ Then the wp-config.php file should contain:
186+ """
187+ define( 'DB_NAME', 'somedb' );
188+ """
189+ And the wp-config.php file should contain:
190+ """
191+ define( 'DB_USER', '' );
192+ """
193+
166194 @require-mysql
167- Scenario: Missing --dbname or --dbuser without SQLite integration
195+ Scenario: Missing --dbname or --dbuser without --skip-check
168196 Given an empty directory
169197 And WP files
170198
171- When I try `wp config create --skip-check -- dbuser=someuser`
199+ When I try `wp config create --dbuser=someuser`
172200 Then the return code should be 1
173201 And STDERR should contain:
174202 """
175203 Error: Parameter errors:
176204 missing --dbname parameter (Set the database name.)
177205 """
178206
179- When I try `wp config create --skip-check -- dbname=somedb`
207+ When I try `wp config create --dbname=somedb`
180208 Then the return code should be 1
181209 And STDERR should contain:
182210 """
0 commit comments