From ee40ae7bf8d9520f61d479d53e0dab12776ee4a1 Mon Sep 17 00:00:00 2001 From: Kristoffer Brabrand Date: Sat, 16 May 2015 10:23:18 +0200 Subject: [PATCH] Change phpunit constant nnames to include mysql. Added constants for mongo --- phpunit.xml.dist | 22 +++++++++++----- .../Models/Dao/MySQLTest.php | 26 +++++++++---------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 83f3e3a..de1df0a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,17 +13,25 @@ - - - + + + + + + + - - + + + + - - + + + + diff --git a/tests/DaoIntegrationTest/Models/Dao/MySQLTest.php b/tests/DaoIntegrationTest/Models/Dao/MySQLTest.php index 6b82d4e..e46cb20 100644 --- a/tests/DaoIntegrationTest/Models/Dao/MySQLTest.php +++ b/tests/DaoIntegrationTest/Models/Dao/MySQLTest.php @@ -65,15 +65,15 @@ public function setUp() } $constants = [ - 'DAO_DB_HOST', - 'DAO_DB_PORT', - 'DAO_DB_NAME', + 'DAO_MYSQL_HOST', + 'DAO_MYSQL_PORT', + 'DAO_MYSQL_NAME', - 'DAO_DB_RO_USER', - 'DAO_DB_RO_PASS', + 'DAO_MYSQL_RO_USER', + 'DAO_MYSQL_RO_PASS', - 'DAO_DB_RW_USER', - 'DAO_DB_RW_PASS', + 'DAO_MYSQL_RW_USER', + 'DAO_MYSQL_RW_PASS', 'DAO_ELASTIC_SEARCH_HOST', 'DAO_ELASTIC_SEARCH_PORT', @@ -91,14 +91,14 @@ public function setUp() $roDb = new PDO( $this->getDsn(), - DAO_DB_RO_USER, - DAO_DB_RO_PASS + DAO_MYSQL_RO_USER, + DAO_MYSQL_RO_PASS ); $rwDb = new PDO( $this->getDsn(), - DAO_DB_RW_USER, - DAO_DB_RW_PASS + DAO_MYSQL_RW_USER, + DAO_MYSQL_RW_PASS ); $memcached = new Memcached(); @@ -339,8 +339,8 @@ private function getElasticIndex() private function getDsn() { - $dsn = 'mysql:host=' . DAO_DB_HOST . ';port=' . DAO_DB_PORT; - $dsn .= ';dbname=' . DAO_DB_NAME . ';'; + $dsn = 'mysql:host=' . DAO_MYSQL_HOST . ';port=' . DAO_MYSQL_PORT; + $dsn .= ';dbname=' . DAO_MYSQL_NAME . ';'; return $dsn; }