fixes #4671, skip DboOracle tests when driver is not set. Clean up other dbo tests to be consistent

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6908 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-05-17 13:59:29 +00:00
parent 10d555d5e2
commit bc6a8e03b5
4 changed files with 9 additions and 11 deletions

View file

@ -117,8 +117,7 @@ class DboMssqlTest extends CakeTestCase {
*/ */
function skip() { function skip() {
$this->_initDb(); $this->_initDb();
$db =& ConnectionManager::getDataSource('test_suite'); $this->skipif ($this->db->config['driver'] != 'mssql', 'SQL Server connection not available');
$this->skipif ($db->config['driver'] != 'mssql', 'SQL Server connection not available');
} }
/** /**
* Sets up a Dbo class instance for testing * Sets up a Dbo class instance for testing

View file

@ -120,8 +120,7 @@ class DboMysqlTest extends CakeTestCase {
*/ */
function skip() { function skip() {
$this->_initDb(); $this->_initDb();
$db =& ConnectionManager::getDataSource('test_suite'); $this->skipif($this->db->config['driver'] != 'mysql', 'MySQL connection not available');
$this->skipif($db->config['driver'] != 'mysql', 'MySQL connection not available');
} }
/** /**
* Sets up a Dbo class instance for testing * Sets up a Dbo class instance for testing

View file

@ -32,8 +32,9 @@ require_once LIBS.'model'.DS.'datasources'.DS.'dbo_source.php';
class DboOracleTest extends CakeTestCase { class DboOracleTest extends CakeTestCase {
function setUp() { function skip() {
$this->db = ConnectionManager::getDataSource('default'); $this->_initDb();
$this->skipif($this->db->config['driver'] != 'oracle', 'Oracle connection not available');
} }
function testLastErrorStatement() { function testLastErrorStatement() {

View file

@ -115,7 +115,6 @@ class DboPostgresTest extends CakeTestCase {
*/ */
function skip() { function skip() {
$this->_initDb(); $this->_initDb();
$db = ConnectionManager::getDataSource('test_suite');
$this->skipif ($this->db->config['driver'] != 'postgres', 'PostgreSQL connection not available'); $this->skipif ($this->db->config['driver'] != 'postgres', 'PostgreSQL connection not available');
} }