Skip to content

Commit

Permalink
Skipping Oracle tests if not using Oracle configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
renan committed May 24, 2011
1 parent a6ed668 commit 423fa81
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php
Expand Up @@ -39,31 +39,19 @@ class DboOracleTest extends CakeTestCase {
* @return void
*/
function setUp() {
//$this->_initDb();
$this->Dbo = ConnectionManager::getDataSource('test');
if (!($this->Dbo instanceof Oracle)) {
$this->markTestSkipped('The Oracle extension is not available.');
}
}

/**
* skip method
*
* @access public
* @return void
*/
function skip() {
//$this->_initDb();
$this->skipUnless($this->db->config['datasource'] == 'Database/Oracle', '%s Oracle connection not available');
}

/**
* testLastErrorStatement method
*
* @access public
* @return void
*/
function testLastErrorStatement() {
if ($this->skip('testLastErrorStatement')) {
return;
}

$this->expectError();
$this->db->execute("SELECT ' FROM dual");
$e = $this->db->lastError();
Expand All @@ -78,10 +66,6 @@ function testLastErrorStatement() {
* @return void
*/
function testLastErrorConnect() {
if ($this->skip('testLastErrorConnect')) {
return;
}

$config = $this->db->config;
$old_pw = $this->db->config['password'];
$this->db->config['password'] = 'keepmeout';
Expand Down

0 comments on commit 423fa81

Please sign in to comment.