@@ -113,7 +113,10 @@ Feature: Create a wp-config file
113113 Given an empty directory
114114 And WP files
115115
116- When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --skip-salts --extra-php < /dev/null`
116+ And an empty.php file:
117+ """
118+ """
119+ When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --skip-salts --extra-php < empty.php`
117120 Then the wp-config.php file should not contain:
118121 """
119122 define('AUTH_SALT',
@@ -194,11 +197,8 @@ Feature: Create a wp-config file
194197 Then save STDOUT as {SOCKET}
195198 And STDOUT should not be empty
196199
197- When I try `wget -O {RUN_DIR}/install-package-tests https://raw.githubusercontent.com/wp-cli/wp-cli-tests/main/bin/install-package-tests`
198- Then STDERR should contain:
199- """
200- install-package-tests' saved
201- """
200+ When I try `curl -sS -L -o {RUN_DIR}/install-package-tests https://raw.githubusercontent.com/wp-cli/wp-cli-tests/main/bin/install-package-tests`
201+ Then the {RUN_DIR}/install-package-tests file should exist
202202
203203 When I run `chmod +x {RUN_DIR}/install-package-tests`
204204 Then STDERR should be empty
@@ -247,7 +247,7 @@ Feature: Create a wp-config file
247247 Given an empty directory
248248 And WP files
249249
250- When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=' p@(ss){w0r?d><}"!With"DoubleQuotes' `
250+ When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=" p@(ss){w0r?d><}\ "!With\ "DoubleQuotes" `
251251 Then the wp-config.php file should contain:
252252 """
253253 define( 'DB_PASSWORD', 'p@(ss){w0r?d><}"!With"DoubleQuotes' )
@@ -263,16 +263,16 @@ Feature: Create a wp-config file
263263 Given an empty directory
264264 And WP files
265265
266- When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=' my\\ password' `
266+ When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass=" my\password" `
267267 Then the wp-config.php file should contain:
268268 """
269- define( 'DB_PASSWORD', 'my\\\\ password' )
269+ define( 'DB_PASSWORD', 'my\\password' )
270270 """
271271
272272 When I run `wp config get DB_PASSWORD`
273273 Then STDOUT should be:
274274 """
275- my\\ password
275+ my\password
276276 """
277277
278278 Scenario: wp-config.php in parent folder should not prevent config create in subfolder
0 commit comments