diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php index e53a3dd2d..e5da0c890 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php @@ -117,8 +117,7 @@ class DboMssqlTest extends CakeTestCase { */ function skip() { $this->_initDb(); - $db =& ConnectionManager::getDataSource('test_suite'); - $this->skipif ($db->config['driver'] != 'mssql', 'SQL Server connection not available'); + $this->skipif ($this->db->config['driver'] != 'mssql', 'SQL Server connection not available'); } /** * Sets up a Dbo class instance for testing diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index f558e4f21..f515feacd 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -120,8 +120,7 @@ class DboMysqlTest extends CakeTestCase { */ function skip() { $this->_initDb(); - $db =& ConnectionManager::getDataSource('test_suite'); - $this->skipif($db->config['driver'] != 'mysql', 'MySQL connection not available'); + $this->skipif($this->db->config['driver'] != 'mysql', 'MySQL connection not available'); } /** * Sets up a Dbo class instance for testing diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php index 1891bbdca..cf51c5e01 100755 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_oracle.test.php @@ -31,11 +31,12 @@ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) { require_once LIBS.'model'.DS.'datasources'.DS.'dbo_source.php'; class DboOracleTest extends CakeTestCase { - - function setUp() { - $this->db = ConnectionManager::getDataSource('default'); + + function skip() { + $this->_initDb(); + $this->skipif($this->db->config['driver'] != 'oracle', 'Oracle connection not available'); } - + function testLastErrorStatement() { $this->expectError(); $this->db->execute("SELECT ' FROM dual"); @@ -43,7 +44,7 @@ class DboOracleTest extends CakeTestCase { $r = 'ORA-01756: quoted string not properly terminated'; $this->assertEqual($e, $r); } - + function testLastErrorConnect() { $config = $this->db->config; $this->db->config['password'] = 'keepmeout'; @@ -53,7 +54,7 @@ class DboOracleTest extends CakeTestCase { $this->assertEqual($e, $r); } - + } diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index 72431a1de..2bf7ab378 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -115,7 +115,6 @@ class DboPostgresTest extends CakeTestCase { */ function skip() { $this->_initDb(); - $db = ConnectionManager::getDataSource('test_suite'); $this->skipif ($this->db->config['driver'] != 'postgres', 'PostgreSQL connection not available'); }