From: Chuck Hagenbuch Date: Thu, 14 Jan 2010 04:44:43 +0000 (-0500) Subject: start moving away from Horde_Db_Adapter::factory() X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=48328a85e15a6bd4cbce66d04b879b9a878f1e34;p=horde.git start moving away from Horde_Db_Adapter::factory() --- diff --git a/framework/Db/test/Horde/Db/Adapter/MysqliSuite.php b/framework/Db/test/Horde/Db/Adapter/MysqliSuite.php index 6df9f64c3..7cb4c1c15 100644 --- a/framework/Db/test/Horde/Db/Adapter/MysqliSuite.php +++ b/framework/Db/test/Horde/Db/Adapter/MysqliSuite.php @@ -63,7 +63,6 @@ class Horde_Db_Adapter_MysqliSuite extends PHPUnit_Framework_TestSuite $cache = new CacheMock; $config = array( - 'adapter' => 'mysqli', 'host' => 'localhost', 'username' => '', 'password' => '', @@ -73,7 +72,7 @@ class Horde_Db_Adapter_MysqliSuite extends PHPUnit_Framework_TestSuite if (isset($_ENV['HORDE_DB_TEST_DSN_MYSQLI'])) $config = array_merge($config, @json_decode($_ENV['HORDE_DB_TEST_DSN_MYSQLI'], true)); - $conn = Horde_Db_Adapter::factory($config); + $conn = new Horde_Db_Adapter_Mysqli($config); return array($conn, $cache); } diff --git a/framework/Db/test/Horde/Db/Adapter/Pdo/MysqlSuite.php b/framework/Db/test/Horde/Db/Adapter/Pdo/MysqlSuite.php index e32ad25e4..b3fc06f3b 100644 --- a/framework/Db/test/Horde/Db/Adapter/Pdo/MysqlSuite.php +++ b/framework/Db/test/Horde/Db/Adapter/Pdo/MysqlSuite.php @@ -63,7 +63,6 @@ class Horde_Db_Adapter_Pdo_MysqlSuite extends PHPUnit_Framework_TestSuite $cache = new CacheMock; $config = array( - 'adapter' => 'pdo_mysql', 'host' => 'localhost', 'username' => '', 'password' => '', @@ -73,7 +72,7 @@ class Horde_Db_Adapter_Pdo_MysqlSuite extends PHPUnit_Framework_TestSuite if (isset($_ENV['HORDE_DB_TEST_DSN_PDO_MYSQL'])) $config = array_merge($config, @json_decode($_ENV['HORDE_DB_TEST_DSN_PDO_MYSQL'], true)); - $conn = Horde_Db_Adapter::factory($config); + $conn = new Horde_Db_Adapter_Pdo_Mysql($config); return array($conn, $cache); } diff --git a/framework/Db/test/Horde/Db/Adapter/Pdo/PgsqlSuite.php b/framework/Db/test/Horde/Db/Adapter/Pdo/PgsqlSuite.php index 62250aa68..f4b92e2d0 100644 --- a/framework/Db/test/Horde/Db/Adapter/Pdo/PgsqlSuite.php +++ b/framework/Db/test/Horde/Db/Adapter/Pdo/PgsqlSuite.php @@ -66,7 +66,6 @@ class Horde_Db_Adapter_Pdo_PgsqlSuite extends PHPUnit_Framework_TestSuite $cache = new CacheMock; $config = array( - 'adapter' => 'pdo_pgsql', 'username' => '', 'password' => '', 'dbname' => 'test', @@ -75,7 +74,7 @@ class Horde_Db_Adapter_Pdo_PgsqlSuite extends PHPUnit_Framework_TestSuite if (isset($_ENV['HORDE_DB_TEST_DSN_PDO_PGSQL'])) $config = array_merge($config, @json_decode($_ENV['HORDE_DB_TEST_DSN_PDO_PGSQL'], true)); - $conn = Horde_Db_Adapter::factory($config); + $conn = new Horde_Db_Adapter_Pdo_Pgsql($config); return array($conn, $cache); } diff --git a/framework/Db/test/Horde/Db/Adapter/Pdo/SqliteSuite.php b/framework/Db/test/Horde/Db/Adapter/Pdo/SqliteSuite.php index 8b2336b39..e3641dcd2 100644 --- a/framework/Db/test/Horde/Db/Adapter/Pdo/SqliteSuite.php +++ b/framework/Db/test/Horde/Db/Adapter/Pdo/SqliteSuite.php @@ -62,8 +62,7 @@ class Horde_Db_Adapter_Pdo_SqliteSuite extends PHPUnit_Framework_TestSuite if (!class_exists('CacheMock', false)) eval('class CacheMock { function get($key) { return $this->$key; } function set($key, $val) { $this->$key = $val; } } ?>'); $cache = new CacheMock; - $conn = Horde_Db_Adapter::factory(array( - 'adapter' => 'pdo_sqlite', + $conn = new Horde_Db_Adapter_Pdo_Sqlite(array( 'dbname' => ':memory:', 'cache' => $cache, ));