From 18489b43027b9f5ce2ff9cf579ae3c0af28edd8a Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Thu, 22 Mar 2012 16:19:36 -0400 Subject: [PATCH] Connect with default username/pass if running on Travis --- tests/databases/mysql-qb.php | 4 ++-- tests/databases/mysql.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/databases/mysql-qb.php b/tests/databases/mysql-qb.php index 5295686..fe76025 100644 --- a/tests/databases/mysql-qb.php +++ b/tests/databases/mysql-qb.php @@ -19,7 +19,7 @@ class MySQLQBTest extends QBTest { parent::__construct(); // Attempt to connect, if there is a test config file - /*if (is_file("../test_config.json")) + if (is_file("../test_config.json")) { $params = json_decode(file_get_contents("../test_config.json")); $params = $params->mysql; @@ -29,7 +29,7 @@ class MySQLQBTest extends QBTest { // echo '
MySQL Queries
'; } - elseif ( ! empty($_ENV['TRAVIS']))*/ + elseif ( ! empty($_ENV['TRAVIS_PHP_VERSION'])) { $params = array( 'host' => '127.0.0.1', diff --git a/tests/databases/mysql.php b/tests/databases/mysql.php index 37f7a26..405b6a6 100644 --- a/tests/databases/mysql.php +++ b/tests/databases/mysql.php @@ -22,14 +22,14 @@ class MySQLTest extends DBTest { function setUp() { // Attempt to connect, if there is a test config file - /*if (is_file("../test_config.json")) + if (is_file("../test_config.json")) { $params = json_decode(file_get_contents("../test_config.json")); $params = $params->mysql; $this->db = new MySQL("host={$params->host};port={$params->port};dbname={$params->database}", $params->user, $params->pass); } - elseif ( ! empty($_ENV['TRAVIS']))*/ + elseif ( ! empty($_ENV['TRAVIS_PHP_VERSION'])) { $this->db = new MySQL('host=127.0.0.1;port=3306;dbname=test', 'root'); }