From 44015c8d91ecea78ee4a10de579c36a859c2fcb6 Mon Sep 17 00:00:00 2001 From: Taufan Aditya Date: Wed, 4 Apr 2012 19:38:16 +0700 Subject: Set up PDO constant and configuration --- tests/mocks/database/config/pdo/pgsql.php | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tests/mocks/database/config/pdo/pgsql.php (limited to 'tests/mocks/database/config/pdo/pgsql.php') diff --git a/tests/mocks/database/config/pdo/pgsql.php b/tests/mocks/database/config/pdo/pgsql.php new file mode 100644 index 000000000..b2f409d8d --- /dev/null +++ b/tests/mocks/database/config/pdo/pgsql.php @@ -0,0 +1,37 @@ + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'postgres', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'pdo', + 'pdodriver' => 'pgsql', + ), + + // Database configuration with failover + 'pdo/pgsql_failover' => array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'not_travis', + 'password' => 'wrong password', + 'database' => 'not_ci_test', + 'dbdriver' => 'pdo', + 'pdodriver' => 'pgsql', + 'failover' => array( + array( + 'dsn' => '', + 'hostname' => 'localhost', + 'username' => 'postgres', + 'password' => '', + 'database' => 'ci_test', + 'dbdriver' => 'pdo', + 'pdodriver' => 'pgsql', + ), + ), + ), +); \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 55f804239cb0141fdac748607d8cdfa143efac92 Mon Sep 17 00:00:00 2001 From: Taufan Aditya Date: Thu, 5 Apr 2012 01:48:52 +0700 Subject: Add dsn to pgsql --- tests/mocks/database/config/pdo/pgsql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/mocks/database/config/pdo/pgsql.php') diff --git a/tests/mocks/database/config/pdo/pgsql.php b/tests/mocks/database/config/pdo/pgsql.php index b2f409d8d..5196e9ad9 100644 --- a/tests/mocks/database/config/pdo/pgsql.php +++ b/tests/mocks/database/config/pdo/pgsql.php @@ -4,7 +4,7 @@ return array( // Typical Database configuration 'pdo/pgsql' => array( - 'dsn' => '', + 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;', 'hostname' => 'localhost', 'username' => 'postgres', 'password' => '', @@ -24,7 +24,7 @@ return array( 'pdodriver' => 'pgsql', 'failover' => array( array( - 'dsn' => '', + 'dsn' => 'pgsql:host=localhost;port=5432;dbname=ci_test;', 'hostname' => 'localhost', 'username' => 'postgres', 'password' => '', -- cgit v1.2.3-24-g4f1b 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/pdo/pgsql.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/mocks/database/config/pdo/pgsql.php') 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 -- 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/pgsql.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/mocks/database/config/pdo/pgsql.php') 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' ) ) ) -- cgit v1.2.3-24-g4f1b