File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -482,6 +482,14 @@ public static function create_cache_dir() {
482482 * Every scenario gets its own context object.
483483 */
484484 public function __construct () {
485+ if ( getenv ( 'WP_CLI_TEST_DBROOTUSER ' ) ) {
486+ self ::$ db_settings ['dbrootuser ' ] = getenv ( 'WP_CLI_TEST_DBROOTUSER ' );
487+ }
488+
489+ if ( false !== getenv ( 'WP_CLI_TEST_DBROOTPASS ' ) ) {
490+ self ::$ db_settings ['dbrootpass ' ] = getenv ( 'WP_CLI_TEST_DBROOTPASS ' );
491+ }
492+
485493 if ( getenv ( 'WP_CLI_TEST_DBUSER ' ) ) {
486494 self ::$ db_settings ['dbuser ' ] = getenv ( 'WP_CLI_TEST_DBUSER ' );
487495 }
@@ -496,6 +504,8 @@ public function __construct() {
496504
497505 $ this ->drop_db ();
498506 $ this ->set_cache_dir ();
507+ $ this ->variables ['DB_ROOT_USER ' ] = self ::$ db_settings ['dbrootuser ' ];
508+ $ this ->variables ['DB_ROOT_PASSWORD ' ] = self ::$ db_settings ['dbrootpass ' ];
499509 $ this ->variables ['DB_USER ' ] = self ::$ db_settings ['dbuser ' ];
500510 $ this ->variables ['DB_PASSWORD ' ] = self ::$ db_settings ['dbpass ' ];
501511 $ this ->variables ['DB_HOST ' ] = self ::$ db_settings ['dbhost ' ];
You can’t perform that action at this time.
0 commit comments