Skip to content

Commit 606a34e

Browse files
committed
Add behat test creating user requiring ssl connection and creating a config
1 parent 85d5fc4 commit 606a34e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

features/config-create.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,15 @@ Feature: Create a wp-config file
293293
PasswordWith'SingleQuotes'
294294
"""
295295
296+
@require-mysql
297+
Scenario: Configure with required SSL connection
298+
Given an empty directory
299+
And WP files
300+
And I run `MYSQL_PWD='{WP_CLI_TEST_DBROOTPASS}' mysql -u root -e "CREATE USER IF NOT EXISTS 'wp_cli_test_ssl'@'127.0.0.1' IDENTIFIED BY 'password2' REQUIRE SSL;"`
301+
302+
When I try `wp config create --dbhost=127.0.0.1 --dbname=wp_cli_test --dbuser=wp_cli_test_ssl --dbpass=password2 --ssl`
303+
Then the return code should be 0
304+
Then the wp-config.php file should contain:
305+
"""
306+
define( 'DB_USER', 'wp_cli_test_ssl' )
307+
"""

0 commit comments

Comments
 (0)