Skip to content

Commit 38a511e

Browse files
authored
Merge pull request #115 from Lewiscowles1986/patch-3
2 parents 827f541 + 177a1b0 commit 38a511e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Context/FeatureContext.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,14 @@ public function __construct() {
502502
$this->variables['DB_HOST'] = getenv( 'WP_CLI_TEST_DBHOST' );
503503
}
504504

505+
if ( getenv( 'MYSQL_TCP_PORT' ) ) {
506+
$this->variables['MYSQL_PORT'] = getenv( 'MYSQL_TCP_PORT' );
507+
}
508+
509+
if ( getenv( 'MYSQL_HOST' ) ) {
510+
$this->variables['MYSQL_HOST'] = getenv( 'MYSQL_HOST' );
511+
}
512+
505513
self::$db_settings['dbuser'] = $this->variables['DB_USER'];
506514
self::$db_settings['dbpass'] = $this->variables['DB_PASSWORD'];
507515
self::$db_settings['dbhost'] = $this->variables['DB_HOST'];

0 commit comments

Comments
 (0)