diff options
author | dchill42 <dchill42@gmail.com> | 2012-07-23 16:53:47 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-07-23 16:53:47 +0200 |
commit | c5079de78e5141330c07e990811ef15e998e95aa (patch) | |
tree | 0f39d8c4fc7614246fc185810bfeaa7fad88a33a /tests/mocks/database/config | |
parent | 00fcb545109d4e61bc14e403ec828749c34a54b3 (diff) | |
parent | ede49ba66b127535f3430e20aac72ceed2c4611a (diff) |
Merge branch develop of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'tests/mocks/database/config')
-rw-r--r-- | tests/mocks/database/config/mysql.php | 34 | ||||
-rw-r--r-- | tests/mocks/database/config/pdo/mysql.php | 37 | ||||
-rw-r--r-- | tests/mocks/database/config/pdo/pgsql.php | 37 | ||||
-rw-r--r-- | tests/mocks/database/config/pdo/sqlite.php | 37 | ||||
-rw-r--r-- | tests/mocks/database/config/pgsql.php | 34 | ||||
-rw-r--r-- | tests/mocks/database/config/sqlite.php | 34 |
6 files changed, 213 insertions, 0 deletions
diff --git a/tests/mocks/database/config/mysql.php b/tests/mocks/database/config/mysql.php new file mode 100644 index 000000000..a590b9f53 --- /dev/null +++ b/tests/mocks/database/config/mysql.php @@ -0,0 +1,34 @@ +<?php + +return array( + + // Typical Database configuration + 'mysql' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'travis', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'mysql' + ), + + // Database configuration with failover + 'mysql_failover' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'not_travis', + 'password' => 'wrong password', + 'database' => 'not_ci_test', + 'dbdriver' => 'mysql', + 'failover' => array( + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'travis', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'mysql', + ) + ) + ) +);
\ 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 new file mode 100644 index 000000000..1444b0066 --- /dev/null +++ b/tests/mocks/database/config/pgsql.php @@ -0,0 +1,34 @@ +<?php + +return array( + + // Typical Database configuration + 'pgsql' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'postgres', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'postgre' + ), + + // Database configuration with failover + 'pgsql_failover' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'not_travis', + 'password' => 'wrong password', + 'database' => 'not_ci_test', + 'dbdriver' => 'postgre', + 'failover' => array( + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'postgres', + '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 new file mode 100644 index 000000000..d37ee4871 --- /dev/null +++ b/tests/mocks/database/config/sqlite.php @@ -0,0 +1,34 @@ +<?php + +return array( + + // Typical Database configuration + 'sqlite' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'sqlite', + 'password' => 'sqlite', + 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite', + 'dbdriver' => 'sqlite3' + ), + + // Database configuration with failover + 'sqlite_failover' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'sqlite', + 'password' => 'sqlite', + 'database' => '../not_exists.sqlite', + 'dbdriver' => 'sqlite3', + 'failover' => array( + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'sqlite', + 'password' => 'sqlite', + 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite', + 'dbdriver' => 'sqlite3' + ) + ) + ) +);
\ No newline at end of file |