diff options
Diffstat (limited to 'tests/mocks/database')
-rw-r--r-- | tests/mocks/database/config/pdo/mysql.php | 6 | ||||
-rw-r--r-- | tests/mocks/database/config/pdo/pgsql.php | 6 | ||||
-rw-r--r-- | tests/mocks/database/config/pdo/sqlite.php | 6 | ||||
-rw-r--r-- | tests/mocks/database/db.php | 8 |
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/mocks/database/config/pdo/mysql.php b/tests/mocks/database/config/pdo/mysql.php index fefe0d624..97ea24b65 100644 --- a/tests/mocks/database/config/pdo/mysql.php +++ b/tests/mocks/database/config/pdo/mysql.php @@ -10,7 +10,7 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'mysql' + 'subdriver' => 'mysql' ), // Database configuration with failover @@ -21,7 +21,7 @@ return array( 'password' => 'wrong password', 'database' => 'not_ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'mysql', + 'subdriver' => 'mysql', 'failover' => array( array( 'dsn' => '', @@ -30,7 +30,7 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'mysql' + 'subdriver' => 'mysql' ) ) ) diff --git a/tests/mocks/database/config/pdo/pgsql.php b/tests/mocks/database/config/pdo/pgsql.php index ddd638c8a..e55e3ea77 100644 --- a/tests/mocks/database/config/pdo/pgsql.php +++ b/tests/mocks/database/config/pdo/pgsql.php @@ -10,7 +10,7 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'pgsql' + 'subdriver' => 'pgsql' ), // Database configuration with failover @@ -21,7 +21,7 @@ return array( 'password' => 'wrong password', 'database' => 'not_ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'pgsql', + 'subdriver' => 'pgsql', 'failover' => array( array( 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;', @@ -30,7 +30,7 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'pgsql' + 'subdriver' => 'pgsql' ) ) ) diff --git a/tests/mocks/database/config/pdo/sqlite.php b/tests/mocks/database/config/pdo/sqlite.php index 36461843d..1bf56b3ac 100644 --- a/tests/mocks/database/config/pdo/sqlite.php +++ b/tests/mocks/database/config/pdo/sqlite.php @@ -10,7 +10,7 @@ return array( 'password' => 'sqlite', 'database' => 'sqlite', 'dbdriver' => 'pdo', - 'pdodriver' => 'sqlite' + 'subdriver' => 'sqlite' ), // Database configuration with failover @@ -21,7 +21,7 @@ return array( 'password' => 'sqlite', 'database' => 'sqlite', 'dbdriver' => 'pdo', - 'pdodriver' => 'sqlite', + 'subdriver' => 'sqlite', 'failover' => array( array( 'dsn' => 'sqlite:/'.realpath(__DIR__.'/../..').'/ci_test.sqlite', @@ -30,7 +30,7 @@ return array( 'password' => 'sqlite', 'database' => 'sqlite', 'dbdriver' => 'pdo', - 'pdodriver' => 'sqlite' + 'subdriver' => 'sqlite' ) ) ) diff --git a/tests/mocks/database/db.php b/tests/mocks/database/db.php index 30504bba6..75658530b 100644 --- a/tests/mocks/database/db.php +++ b/tests/mocks/database/db.php @@ -45,9 +45,9 @@ class Mock_Database_DB { ); $config = array_merge($this->config[$group], $params); - $dsnstring = ( ! empty($config['dsn'])) ? $config['dsn'] : FALSE; - $pdodriver = ( ! empty($config['pdodriver'])) ? $config['pdodriver'] : FALSE; - $failover = ( ! empty($config['failover'])) ? $config['failover'] : FALSE; + $dsnstring = empty($config['dsn']) ? FALSE : $config['dsn']; + $subdriver = empty($config['subdriver']) ? FALSE: $config['subdriver']; + $failover = empty($config['failover']) ? FALSE : $config['failover']; $dsn = $config['dbdriver'].'://'.$config['username'].':'.$config['password'] .'@'.$config['hostname'].'/'.$config['database']; @@ -55,7 +55,7 @@ class Mock_Database_DB { // Build the parameter $other_params = array_slice($config, 6); if ($dsnstring) $other_params['dsn'] = $dsnstring; - if ($pdodriver) $other_params['pdodriver'] = $pdodriver; + if ($subdriver) $other_params['subdriver'] = $subdriver; if ($failover) $other_params['failover'] = $failover; return $dsn.'?'.http_build_query($other_params); |