summaryrefslogtreecommitdiffstats
path: root/tests/mocks/database/config
diff options
context:
space:
mode:
authorEric Roberts <eric@cryode.com>2012-12-12 14:02:11 +0100
committerEric Roberts <eric@cryode.com>2012-12-12 14:02:11 +0100
commitb9e35f21e1c70b6aa67c47e9244ed83195abc00a (patch)
tree64f82db362deeac48cc20d1d1afd80651f36f5a5 /tests/mocks/database/config
parent0b05705c52c3bca7f9b3aee657c888e8ad1ff422 (diff)
parent545a7c86701875e1412bcde316e9bcc76d9a23a0 (diff)
Merge branch 'refs/heads/develop' into feature/form_error_msgs
Conflicts: system/language/english/form_validation_lang.php user_guide_src/source/libraries/form_validation.rst Signed-off-by: Eric Roberts <eric@cryode.com>
Diffstat (limited to 'tests/mocks/database/config')
-rw-r--r--tests/mocks/database/config/mysql.php10
-rw-r--r--tests/mocks/database/config/mysqli.php34
-rw-r--r--tests/mocks/database/config/pdo/mysql.php37
-rw-r--r--tests/mocks/database/config/pdo/pgsql.php37
-rw-r--r--tests/mocks/database/config/pdo/sqlite.php37
-rw-r--r--tests/mocks/database/config/pgsql.php10
-rw-r--r--tests/mocks/database/config/sqlite.php15
7 files changed, 162 insertions, 18 deletions
diff --git a/tests/mocks/database/config/mysql.php b/tests/mocks/database/config/mysql.php
index ace0a31b1..a590b9f53 100644
--- a/tests/mocks/database/config/mysql.php
+++ b/tests/mocks/database/config/mysql.php
@@ -1,7 +1,7 @@
<?php
return array(
-
+
// Typical Database configuration
'mysql' => array(
'dsn' => '',
@@ -9,7 +9,7 @@ return array(
'username' => 'travis',
'password' => '',
'database' => 'ci_test',
- 'dbdriver' => 'mysql',
+ 'dbdriver' => 'mysql'
),
// Database configuration with failover
@@ -28,7 +28,7 @@ return array(
'password' => '',
'database' => 'ci_test',
'dbdriver' => 'mysql',
- ),
- ),
- ),
+ )
+ )
+ )
); \ No newline at end of file
diff --git a/tests/mocks/database/config/mysqli.php b/tests/mocks/database/config/mysqli.php
new file mode 100644
index 000000000..5dd08abb2
--- /dev/null
+++ b/tests/mocks/database/config/mysqli.php
@@ -0,0 +1,34 @@
+<?php
+
+return array(
+
+ // Typical Database configuration
+ 'mysqli' => array(
+ 'dsn' => '',
+ 'hostname' => 'localhost',
+ 'username' => 'travis',
+ 'password' => '',
+ 'database' => 'ci_test',
+ 'dbdriver' => 'mysqli'
+ ),
+
+ // Database configuration with failover
+ 'mysqli_failover' => array(
+ 'dsn' => '',
+ 'hostname' => 'localhost',
+ 'username' => 'not_travis',
+ 'password' => 'wrong password',
+ 'database' => 'not_ci_test',
+ 'dbdriver' => 'mysqli',
+ 'failover' => array(
+ array(
+ 'dsn' => '',
+ 'hostname' => 'localhost',
+ 'username' => 'travis',
+ 'password' => '',
+ 'database' => 'ci_test',
+ 'dbdriver' => 'mysqli',
+ )
+ )
+ )
+); \ No newline at end of file
diff --git a/tests/mocks/database/config/pdo/mysql.php b/tests/mocks/database/config/pdo/mysql.php
new file mode 100644
index 000000000..96608f787
--- /dev/null
+++ b/tests/mocks/database/config/pdo/mysql.php
@@ -0,0 +1,37 @@
+<?php
+
+return array(
+
+ // Typical Database configuration
+ 'pdo/mysql' => array(
+ 'dsn' => 'mysql:host=localhost;dbname=ci_test',
+ 'hostname' => 'localhost',
+ 'username' => 'travis',
+ 'password' => '',
+ 'database' => 'ci_test',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'mysql'
+ ),
+
+ // Database configuration with failover
+ 'pdo/mysql_failover' => array(
+ 'dsn' => '',
+ 'hostname' => 'localhost',
+ 'username' => 'not_travis',
+ 'password' => 'wrong password',
+ 'database' => 'not_ci_test',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'mysql',
+ 'failover' => array(
+ array(
+ 'dsn' => 'mysql:host=localhost;dbname=ci_test',
+ 'hostname' => 'localhost',
+ 'username' => 'travis',
+ 'password' => '',
+ 'database' => 'ci_test',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'mysql'
+ )
+ )
+ )
+); \ No newline at end of file
diff --git a/tests/mocks/database/config/pdo/pgsql.php b/tests/mocks/database/config/pdo/pgsql.php
new file mode 100644
index 000000000..e55e3ea77
--- /dev/null
+++ b/tests/mocks/database/config/pdo/pgsql.php
@@ -0,0 +1,37 @@
+<?php
+
+return array(
+
+ // Typical Database configuration
+ 'pdo/pgsql' => array(
+ 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;',
+ 'hostname' => 'localhost',
+ 'username' => 'postgres',
+ 'password' => '',
+ 'database' => 'ci_test',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'pgsql'
+ ),
+
+ // Database configuration with failover
+ 'pdo/pgsql_failover' => array(
+ 'dsn' => '',
+ 'hostname' => 'localhost',
+ 'username' => 'not_travis',
+ 'password' => 'wrong password',
+ 'database' => 'not_ci_test',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'pgsql',
+ 'failover' => array(
+ array(
+ 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;',
+ 'hostname' => 'localhost',
+ 'username' => 'postgres',
+ 'password' => '',
+ 'database' => 'ci_test',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'pgsql'
+ )
+ )
+ )
+); \ No newline at end of file
diff --git a/tests/mocks/database/config/pdo/sqlite.php b/tests/mocks/database/config/pdo/sqlite.php
new file mode 100644
index 000000000..1bf56b3ac
--- /dev/null
+++ b/tests/mocks/database/config/pdo/sqlite.php
@@ -0,0 +1,37 @@
+<?php
+
+return array(
+
+ // Typical Database configuration
+ 'pdo/sqlite' => array(
+ 'dsn' => 'sqlite:/'.realpath(__DIR__.'/../..').'/ci_test.sqlite',
+ 'hostname' => 'localhost',
+ 'username' => 'sqlite',
+ 'password' => 'sqlite',
+ 'database' => 'sqlite',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'sqlite'
+ ),
+
+ // Database configuration with failover
+ 'pdo/sqlite_failover' => array(
+ 'dsn' => 'sqlite:not_exists.sqlite',
+ 'hostname' => 'localhost',
+ 'username' => 'sqlite',
+ 'password' => 'sqlite',
+ 'database' => 'sqlite',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'sqlite',
+ 'failover' => array(
+ array(
+ 'dsn' => 'sqlite:/'.realpath(__DIR__.'/../..').'/ci_test.sqlite',
+ 'hostname' => 'localhost',
+ 'username' => 'sqlite',
+ 'password' => 'sqlite',
+ 'database' => 'sqlite',
+ 'dbdriver' => 'pdo',
+ 'subdriver' => 'sqlite'
+ )
+ )
+ )
+); \ No newline at end of file
diff --git a/tests/mocks/database/config/pgsql.php b/tests/mocks/database/config/pgsql.php
index c06af8ce0..1444b0066 100644
--- a/tests/mocks/database/config/pgsql.php
+++ b/tests/mocks/database/config/pgsql.php
@@ -1,7 +1,7 @@
<?php
return array(
-
+
// Typical Database configuration
'pgsql' => array(
'dsn' => '',
@@ -9,7 +9,7 @@ return array(
'username' => 'postgres',
'password' => '',
'database' => 'ci_test',
- 'dbdriver' => 'postgre',
+ 'dbdriver' => 'postgre'
),
// Database configuration with failover
@@ -28,7 +28,7 @@ return array(
'password' => '',
'database' => 'ci_test',
'dbdriver' => 'postgre',
- ),
- ),
- ),
+ )
+ )
+ )
); \ No newline at end of file
diff --git a/tests/mocks/database/config/sqlite.php b/tests/mocks/database/config/sqlite.php
index 8665e208d..d37ee4871 100644
--- a/tests/mocks/database/config/sqlite.php
+++ b/tests/mocks/database/config/sqlite.php
@@ -1,5 +1,4 @@
<?php
-$dbdriver = is_php('5.4') ? 'sqlite3' : 'sqlite';
return array(
@@ -10,7 +9,7 @@ return array(
'username' => 'sqlite',
'password' => 'sqlite',
'database' => realpath(__DIR__.'/..').'/ci_test.sqlite',
- 'dbdriver' => $dbdriver,
+ 'dbdriver' => 'sqlite3'
),
// Database configuration with failover
@@ -20,16 +19,16 @@ return array(
'username' => 'sqlite',
'password' => 'sqlite',
'database' => '../not_exists.sqlite',
- 'dbdriver' => $dbdriver,
+ 'dbdriver' => 'sqlite3',
'failover' => array(
array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'sqlite',
'password' => 'sqlite',
- 'database' => realpath(__DIR__.'/..').'/ci_testf.sqlite',
- 'dbdriver' => $dbdriver,
- ),
- ),
- ),
+ 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite',
+ 'dbdriver' => 'sqlite3'
+ )
+ )
+ )
); \ No newline at end of file