diff --git a/features/config-add.feature b/features/config-add.feature index 90acbddf..2ea71399 100644 --- a/features/config-add.feature +++ b/features/config-add.feature @@ -105,7 +105,7 @@ Feature: Add a constant or variable to wp-config.php file define( 'CONST_A', 'val-a' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config add SOME_NAME some_value --anchor="/** ANCHOR */" --placement=before --separator="\n"` @@ -119,7 +119,7 @@ Feature: Add a constant or variable to wp-config.php file define( 'SOME_NAME', 'some_value' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config add ANOTHER_NAME another_value --anchor="/** ANCHOR */" --placement=after --separator="\n"` @@ -134,5 +134,5 @@ Feature: Add a constant or variable to wp-config.php file /** ANCHOR */ define( 'ANOTHER_NAME', 'another_value' ); define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ diff --git a/features/config-create.feature b/features/config-create.feature index 8a6a669f..0dffcb36 100644 --- a/features/config-create.feature +++ b/features/config-create.feature @@ -248,24 +248,24 @@ Feature: Create a wp-config file // The WP_CLI_TEST_DBSOCKET variable can be set in the environment to // override the default locations and will take precedence. if ( ! empty( getenv( 'WP_CLI_TEST_DBSOCKET' ) ) ) { - echo getenv( 'WP_CLI_TEST_DBSOCKET' ); - exit(0); + echo getenv( 'WP_CLI_TEST_DBSOCKET' ); + exit( 0 ); } // From within Behat, the WP_CLI_TEST_DBSOCKET will be mapped to the internal // DB_SOCKET variable, as Behat pushes a new environment context. $locations = [ - '{DB_SOCKET}', - '/var/run/mysqld/mysqld.sock', - '/tmp/mysql.sock', + '{DB_SOCKET}', + '/var/run/mysqld/mysqld.sock', + '/tmp/mysql.sock', ]; foreach ( $locations as $location ) { - if ( ! empty( $location ) && file_exists( $location ) ) { - echo $location; - exit(0); - } + if ( ! empty( $location ) && file_exists( $location ) ) { + echo $location; + exit( 0 ); + } } echo 'No socket found'; - exit(1); + exit( 1 ); """ When I run `php find-socket.php` @@ -371,7 +371,7 @@ Feature: Create a wp-config file And a wp-config.php file: """ + + J=FA3Si$i8uco>+6vB0&aej6X4r@2dc]V}|iFE!{CjOA*u#g4@Y.2j'); - define('NONCE_KEY', 'O..4n~e~(~:7NGyA!q.(`:X,(RcR(n_o|&(*hKrX2+9D=,&1k2k-;>Y_@X+,!6g!'); - define('SECURE_AUTH_SALT', 'VNH|C>w-z?*dtP4ofy!v%RumM.}ug]mx7$QZW|C-R4T`d-~x|xvL{Xc_5C89K(,^'); - define('LOGGED_IN_SALT', 'Iwtez|Q`M l7lup; x&ml8^C|Lk&X[3/-l!$`P3GM$7:WI&X$Hn)unjZ9u~g4m[c'); - define('NONCE_SALT', 'QxcY|80 $f_dRkn*Liu|Ak*aas41g(q5X_h+m8Z$)tf6#TZ+Q,D#%n]g -{=mj1)'); + define( 'AUTH_KEY', '7mj0&+HVh{90t.S]m{u)$\'tCCB$:.[7}jAf`)~hS{ZL#v+&F#kA^p|*RJ=FA3Si$i8uco>+6vB0&aej6X4r@2dc]V}|iFE!{CjOA*u#g4@Y.2j' ); + define( 'NONCE_KEY', 'O..4n~e~(~:7NGyA!q.(`:X,(RcR(n_o|&(*hKrX2+9D=,&1k2k-;>Y_@X+,!6g!' ); + define( 'SECURE_AUTH_SALT', 'VNH|C>w-z?*dtP4ofy!v%RumM.}ug]mx7$QZW|C-R4T`d-~x|xvL{Xc_5C89K(,^' ); + define( 'LOGGED_IN_SALT', 'Iwtez|Q`M l7lup; x&ml8^C|Lk&X[3/-l!$`P3GM$7:WI&X$Hn)unjZ9u~g4m[c' ); + define( 'NONCE_SALT', 'QxcY|80 $f_dRkn*Liu|Ak*aas41g(q5X_h+m8Z$)tf6#TZ+Q,D#%n]g -{=mj1)' ); $table_prefix = 'wp_'; @@ -362,7 +362,7 @@ Feature: List the values of a wp-config.php file /* That's all, stop editing! Happy publishing. */ if ( ! defined( 'ABSPATH' ) ) { - define( 'ABSPATH', dirname( __FILE__ ) . '/' ); + define( 'ABSPATH', __DIR__ . '/' ); } require_once ABSPATH . 'wp-settings.php'; @@ -428,7 +428,7 @@ Feature: List the values of a wp-config.php file define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config list --fields=name,value,type --format=table` @@ -444,7 +444,7 @@ Feature: List the values of a wp-config.php file """ define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config list WP_DEBUG --strict --format=json` @@ -465,7 +465,7 @@ Feature: List the values of a wp-config.php file """ define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config list WP_DEBUG --strict --format=dotenv` diff --git a/features/config-set.feature b/features/config-set.feature index 7afcc562..1ee8cdb5 100644 --- a/features/config-set.feature +++ b/features/config-set.feature @@ -351,7 +351,7 @@ Feature: Set the value of a constant or variable defined in wp-config.php file a define( 'CONST_A', 'val-a' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config set SOME_NAME some_value --type=constant --anchor="/** ANCHOR */" --placement=before --separator="\n"` @@ -365,7 +365,7 @@ Feature: Set the value of a constant or variable defined in wp-config.php file a define( 'SOME_NAME', 'some_value' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config set ANOTHER_NAME another_value --type=constant --anchor="/** ANCHOR */" --placement=after --separator="\n"` @@ -380,7 +380,7 @@ Feature: Set the value of a constant or variable defined in wp-config.php file a /** ANCHOR */ define( 'ANOTHER_NAME', 'another_value' ); define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ Scenario: Additions can be properly placed in wp-custom-config.php @@ -390,7 +390,7 @@ Feature: Set the value of a constant or variable defined in wp-config.php file a define( 'CONST_A', 'val-a' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config set SOME_NAME some_value --type=constant --anchor="/** ANCHOR */" --placement=before --separator="\n" --config-file="wp-custom-config.php"` @@ -404,7 +404,7 @@ Feature: Set the value of a constant or variable defined in wp-config.php file a define( 'SOME_NAME', 'some_value' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config set ANOTHER_NAME another_value --type=constant --anchor="/** ANCHOR */" --placement=after --separator="\n" --config-file="wp-custom-config.php"` @@ -419,5 +419,5 @@ Feature: Set the value of a constant or variable defined in wp-config.php file a /** ANCHOR */ define( 'ANOTHER_NAME', 'another_value' ); define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ diff --git a/features/config-update.feature b/features/config-update.feature index f666f40e..3f15cc23 100644 --- a/features/config-update.feature +++ b/features/config-update.feature @@ -156,7 +156,7 @@ Feature: Update or add a constant or variable in wp-config.php file define( 'CONST_A', 'val-a' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config update SOME_NAME some_value --anchor="/** ANCHOR */" --placement=before --separator="\n"` @@ -170,7 +170,7 @@ Feature: Update or add a constant or variable in wp-config.php file define( 'SOME_NAME', 'some_value' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """ When I run `wp config update SOME_NAME updated_value --anchor="/** ANCHOR */" --placement=before --separator="\n"` @@ -184,5 +184,5 @@ Feature: Update or add a constant or variable in wp-config.php file define( 'SOME_NAME', 'updated_value' ); /** ANCHOR */ define( 'CONST_B', 'val-b' ); - require_once( ABSPATH . 'wp-settings.php' ); + require_once ABSPATH . 'wp-settings.php'; """