Permalink
Browse files

Skipping Oracle tests if not using Oracle configuration.

  • Loading branch information...
1 parent a6ed668 commit 423fa8127e2524dfc3b32d16da0cd5c85f678e24 @renan renan committed May 24, 2011
Showing with 4 additions and 20 deletions.
  1. +4 −20 lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php
View
24 lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php
@@ -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();
@@ -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';

0 comments on commit 423fa81

Please sign in to comment.