summaryrefslogtreecommitdiffstats
path: root/tests/mocks/database/db.php
diff options
context:
space:
mode:
authorTaufan Aditya <toopay@taufanaditya.com>2012-04-04 18:24:09 +0200
committerTaufan Aditya <toopay@taufanaditya.com>2012-04-04 18:24:09 +0200
commitf4c6c9b3061b464c959b6409f962228959f35287 (patch)
tree2e277194428bdbeb5a515817bbc35ad3bb6dc95f /tests/mocks/database/db.php
parent44015c8d91ecea78ee4a10de579c36a859c2fcb6 (diff)
DB Drivers test
Diffstat (limited to 'tests/mocks/database/db.php')
-rw-r--r--tests/mocks/database/db.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/mocks/database/db.php b/tests/mocks/database/db.php
index 43a0d391f..c30e6d2e6 100644
--- a/tests/mocks/database/db.php
+++ b/tests/mocks/database/db.php
@@ -45,6 +45,8 @@ class Mock_Database_DB {
);
$config = array_merge($this->config[$group], $params);
+ $pdodriver = ( ! empty($config['pdodriver'])) ? $config['pdodriver'] : FALSE;
+ $failover = ( ! empty($config['failover'])) ? $config['failover'] : FALSE;
if ( ! empty($config['dsn']))
{
@@ -57,7 +59,11 @@ class Mock_Database_DB {
}
+ // Build the parameter
$other_params = array_slice($config, 6);
+ $other_params['dsn'] = $dsn;
+ if ($pdodriver) $other_params['pdodriver'] = $pdodriver;
+ if ($failover) $other_params['failover'] = $failover;
return $dsn.'?'.http_build_query($other_params);
}