From f243ce13b4baf5bf8bebf36586514bb243dfc355 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 9 Jun 2012 23:34:21 +0300 Subject: Cleanup/optimize tests/mocks/ --- tests/mocks/database/config/mysql.php | 10 +++++----- tests/mocks/database/config/pdo/mysql.php | 12 ++++++------ tests/mocks/database/config/pdo/pgsql.php | 12 ++++++------ tests/mocks/database/config/pdo/sqlite.php | 12 ++++++------ tests/mocks/database/config/pgsql.php | 10 +++++----- tests/mocks/database/config/sqlite.php | 10 +++++----- 6 files changed, 33 insertions(+), 33 deletions(-) (limited to 'tests/mocks/database/config') 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 @@ 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/pdo/mysql.php b/tests/mocks/database/config/pdo/mysql.php index cefb6b008..fefe0d624 100644 --- a/tests/mocks/database/config/pdo/mysql.php +++ b/tests/mocks/database/config/pdo/mysql.php @@ -1,7 +1,7 @@ array( 'dsn' => '', @@ -10,7 +10,7 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'mysql', + 'pdodriver' => 'mysql' ), // Database configuration with failover @@ -30,8 +30,8 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'mysql', - ), - ), - ), + 'pdodriver' => '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 index 5196e9ad9..ddd638c8a 100644 --- a/tests/mocks/database/config/pdo/pgsql.php +++ b/tests/mocks/database/config/pdo/pgsql.php @@ -1,7 +1,7 @@ array( 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;', @@ -10,7 +10,7 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'pgsql', + 'pdodriver' => 'pgsql' ), // Database configuration with failover @@ -30,8 +30,8 @@ return array( 'password' => '', 'database' => 'ci_test', 'dbdriver' => 'pdo', - 'pdodriver' => 'pgsql', - ), - ), - ), + 'pdodriver' => '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 index c68b4b213..36461843d 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', + 'pdodriver' => 'sqlite' ), // Database configuration with failover @@ -29,9 +29,9 @@ return array( 'username' => 'sqlite', 'password' => 'sqlite', 'database' => 'sqlite', - 'dbdriver' => 'pdo', - 'pdodriver' => 'sqlite', - ), - ), - ), + 'dbdriver' => 'pdo', + 'pdodriver' => '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 @@ 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 755ce2a3a..d37ee4871 100644 --- a/tests/mocks/database/config/sqlite.php +++ b/tests/mocks/database/config/sqlite.php @@ -9,7 +9,7 @@ return array( 'username' => 'sqlite', 'password' => 'sqlite', 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite', - 'dbdriver' => 'sqlite3', + 'dbdriver' => 'sqlite3' ), // Database configuration with failover @@ -27,8 +27,8 @@ return array( 'username' => 'sqlite', 'password' => 'sqlite', 'database' => realpath(__DIR__.'/..').'/ci_test.sqlite', - 'dbdriver' => 'sqlite3', - ), - ), - ), + 'dbdriver' => 'sqlite3' + ) + ) + ) ); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From fbba54ea6c896e0545d4d20a19abe06d57ffc97b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 23 Jun 2012 20:26:31 +0300 Subject: Rename pdodriver property to subdriver and make it available to all drivers --- tests/mocks/database/config/pdo/mysql.php | 6 +++--- tests/mocks/database/config/pdo/pgsql.php | 6 +++--- tests/mocks/database/config/pdo/sqlite.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/mocks/database/config') 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' ) ) ) -- cgit v1.2.3-24-g4f1b From 0bb13811397a730444437702bbc1b01a29c27a46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jun 2012 00:44:42 +0300 Subject: Work-around for a failover test (currently DSNs are only built on class initialization) --- tests/mocks/database/config/pdo/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/mocks/database/config') diff --git a/tests/mocks/database/config/pdo/mysql.php b/tests/mocks/database/config/pdo/mysql.php index 97ea24b65..38f822fd7 100644 --- a/tests/mocks/database/config/pdo/mysql.php +++ b/tests/mocks/database/config/pdo/mysql.php @@ -24,7 +24,7 @@ return array( 'subdriver' => 'mysql', 'failover' => array( array( - 'dsn' => '', + 'dsn' => 'mysql:host=localhost;dbname=ci_test', 'hostname' => 'localhost', 'username' => 'travis', 'password' => '', -- cgit v1.2.3-24-g4f1b From cbd78d826b965ad6dfc953686594749cbdf21af3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jun 2012 01:03:34 +0300 Subject: Alter test pdo/mysql config --- tests/mocks/database/config/pdo/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/mocks/database/config') diff --git a/tests/mocks/database/config/pdo/mysql.php b/tests/mocks/database/config/pdo/mysql.php index 38f822fd7..96608f787 100644 --- a/tests/mocks/database/config/pdo/mysql.php +++ b/tests/mocks/database/config/pdo/mysql.php @@ -4,7 +4,7 @@ return array( // Typical Database configuration 'pdo/mysql' => array( - 'dsn' => '', + 'dsn' => 'mysql:host=localhost;dbname=ci_test', 'hostname' => 'localhost', 'username' => 'travis', 'password' => '', -- cgit v1.2.3-24-g4f1b