From 9e1431f79857c572e04d94b3caa7b3a8a697a6fd Mon Sep 17 00:00:00 2001 From: AS Date: Mon, 29 Apr 2013 14:56:33 -0700 Subject: [PATCH] CRM-12460 Fixed: phpunit doesn't get mysql password from civicrm.settings.local.php ---------------------------------------- * CRM-12460: phpunit doesn't get mysql password from civicrm.settings.local.php http://issues.civicrm.org/jira/browse/CRM-12460 --- tests/phpunit/CiviTest/civicrm.settings.dist.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/CiviTest/civicrm.settings.dist.php b/tests/phpunit/CiviTest/civicrm.settings.dist.php index 6c19c4caf5..96ef2d551a 100644 --- a/tests/phpunit/CiviTest/civicrm.settings.dist.php +++ b/tests/phpunit/CiviTest/civicrm.settings.dist.php @@ -8,6 +8,9 @@ if ( ! defined( 'CIVICRM_DSN' ) && ! empty( $GLOBALS['mysql_user'] ) ) { $dbName = ! empty( $GLOBALS['mysql_db'] ) ? $GLOBALS['mysql_db'] : 'civicrm_tests_dev'; + if ( empty( $GLOBALS['mysql_pass'] ) && $GLOBALS['mysql_pass_need_password'] ) { + $GLOBALS['mysql_pass'] = PHPUnit_TextUI_Command::getPassword( 'Password' ); + } define( 'CIVICRM_DSN' , "mysql://{$GLOBALS['mysql_user']}:{$GLOBALS['mysql_pass']}@{$GLOBALS['mysql_host']}/{$dbName}?new_link=true" ); } -- 2.25.1