diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-04 18:24:09 +0200 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-04 18:24:09 +0200 |
commit | f4c6c9b3061b464c959b6409f962228959f35287 (patch) | |
tree | 2e277194428bdbeb5a515817bbc35ad3bb6dc95f /tests/mocks/database/db.php | |
parent | 44015c8d91ecea78ee4a10de579c36a859c2fcb6 (diff) |
DB Drivers test
Diffstat (limited to 'tests/mocks/database/db.php')
-rw-r--r-- | tests/mocks/database/db.php | 6 |
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); } |