diff --git a/features/config-create.feature b/features/config-create.feature index f7e40018..c93bb604 100644 --- a/features/config-create.feature +++ b/features/config-create.feature @@ -113,7 +113,10 @@ Feature: Create a wp-config file Given an empty directory And WP files - When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --skip-salts --extra-php < /dev/null` + And an empty.php file: + """ + """ + When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --skip-salts --extra-php < empty.php` Then the wp-config.php file should not contain: """ define('AUTH_SALT', @@ -194,11 +197,8 @@ Feature: Create a wp-config file Then save STDOUT as {SOCKET} And STDOUT should not be empty - When I try `wget -O {RUN_DIR}/install-package-tests https://raw.githubusercontent.com/wp-cli/wp-cli-tests/main/bin/install-package-tests` - Then STDERR should contain: - """ - install-package-tests' saved - """ + 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` + Then the {RUN_DIR}/install-package-tests file should exist When I run `chmod +x {RUN_DIR}/install-package-tests` Then STDERR should be empty @@ -247,7 +247,7 @@ Feature: Create a wp-config file Given an empty directory And WP files - When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass='p@(ss){w0r?d><}"!With"DoubleQuotes'` + When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass="p@(ss){w0r?d><}\"!With\"DoubleQuotes"` Then the wp-config.php file should contain: """ define( 'DB_PASSWORD', 'p@(ss){w0r?d><}"!With"DoubleQuotes' ) @@ -263,16 +263,16 @@ Feature: Create a wp-config file Given an empty directory And WP files - When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass='my\\password'` + When I run `wp config create --skip-check --dbname=somedb --dbuser=someuser --dbpass="my\password"` Then the wp-config.php file should contain: """ - define( 'DB_PASSWORD', 'my\\\\password' ) + define( 'DB_PASSWORD', 'my\\password' ) """ When I run `wp config get DB_PASSWORD` Then STDOUT should be: """ - my\\password + my\password """ Scenario: wp-config.php in parent folder should not prevent config create in subfolder diff --git a/features/config-edit.feature b/features/config-edit.feature index 21e86983..b2d5189b 100644 --- a/features/config-edit.feature +++ b/features/config-edit.feature @@ -3,7 +3,7 @@ Feature: Edit a wp-config file Scenario: Edit a wp-config.php file Given a WP install - When I try `EDITOR='ex -i NONE -c q!' wp config edit;` + When I try `EDITOR="ex -i NONE -c q!" wp config edit;` Then STDERR should contain: """ Warning: No changes made to wp-config.php, aborted. @@ -21,7 +21,7 @@ Feature: Edit a wp-config file Generated 'wp-custom-config.php' file. """ - When I try `EDITOR='ex -i NONE -c q!' wp config edit --config-file=wp-custom-config.php` + When I try `EDITOR="ex -i NONE -c q!" wp config edit --config-file=wp-custom-config.php` Then STDERR should contain: """ No changes made to wp-custom-config.php, aborted.