Removing Oracle driver, it will not make it to stable release. Revert this commit to bring it back for next version

This commit is contained in:
Jose Lorenzo Rodriguez 2011-09-03 06:50:19 -04:30
parent 85d9b1af8d
commit 89b1e54071
6 changed files with 3 additions and 1250 deletions

View file

@ -31,8 +31,7 @@
* Database/Mysql - MySQL 4 & 5, * Database/Mysql - MySQL 4 & 5,
* Database/Sqlite - SQLite (PHP5 only), * Database/Sqlite - SQLite (PHP5 only),
* Database/Postgres - PostgreSQL 7 and higher, * Database/Postgres - PostgreSQL 7 and higher,
* Database/Sqlserver - Microsoft SQL Server 2005 and higher, * Database/Sqlserver - Microsoft SQL Server 2005 and higher
* Database/Oracle - Oracle 8 and higher
* *
* You can add custom database drivers (or override existing drivers) by adding the * You can add custom database drivers (or override existing drivers) by adding the
* appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.php', * appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.php',

View file

@ -104,7 +104,7 @@ class DbConfigTask extends Shell {
} }
} }
$driver = $this->in(__d('cake_console', 'Driver:'), array('Mysql', 'Oracle', 'Postgres', 'Sqlite', 'Sqlserver'), 'Mysql'); $driver = $this->in(__d('cake_console', 'Driver:'), array('Mysql', 'Postgres', 'Sqlite', 'Sqlserver'), 'Mysql');
$persistent = $this->in(__d('cake_console', 'Persistent Connection?'), array('y', 'n'), 'n'); $persistent = $this->in(__d('cake_console', 'Persistent Connection?'), array('y', 'n'), 'n');
if (strtolower($persistent) == 'n') { if (strtolower($persistent) == 'n') {

View file

@ -31,8 +31,7 @@
* Database/Mysql - MySQL 4 & 5, * Database/Mysql - MySQL 4 & 5,
* Database/Sqlite - SQLite (PHP5 only), * Database/Sqlite - SQLite (PHP5 only),
* Database/Postgres - PostgreSQL 7 and higher, * Database/Postgres - PostgreSQL 7 and higher,
* Database/Sqlserver - Microsoft SQL Server 2005 and higher, * Database/Sqlserver - Microsoft SQL Server 2005 and higher
* Database/Oracle - Oracle 8 and higher
* *
* You can add custom database drivers (or override existing drivers) by adding the * You can add custom database drivers (or override existing drivers) by adding the
* appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.php', * appropriate file to app/Model/Datasource/Database. Drivers should be named 'MyDriver.php',

File diff suppressed because it is too large Load diff

View file

@ -41,7 +41,6 @@ class AllDatabaseTest extends PHPUnit_Framework_TestSuite {
'ConnectionManager', 'ConnectionManager',
'Datasource' . DS . 'DboSource', 'Datasource' . DS . 'DboSource',
'Datasource' . DS . 'Database' . DS . 'Mysql', 'Datasource' . DS . 'Database' . DS . 'Mysql',
'Datasource' . DS . 'Database' . DS . 'Oracle',
'Datasource' . DS . 'Database' . DS . 'Postgres', 'Datasource' . DS . 'Database' . DS . 'Postgres',
'Datasource' . DS . 'Database' . DS . 'Sqlite', 'Datasource' . DS . 'Database' . DS . 'Sqlite',
'Datasource' . DS . 'Database' . DS . 'Sqlserver' 'Datasource' . DS . 'Database' . DS . 'Sqlserver'

View file

@ -1,107 +0,0 @@
<?php
/**
* DboOracleTest file
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package Cake.Test.Case.Model.Datasource.Database
* @since CakePHP(tm) v 1.2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
require_once CAKE . 'Model' . DS . 'Datasource' . DS . 'DboSource.php';
require_once CAKE . 'Model' . DS . 'Datasource' . DS . 'Database' . DS . 'Oracle.php';
/**
* DboOracleTest class
*
* @package Cake.Test.Case.Model.Datasource.Database
*/
class DboOracleTest extends CakeTestCase {
/**
* fixtures property
*/
public $fixtures = array('core.oracle_user');
/**
* setup method
*
* @return void
*/
public function setUp() {
$this->Dbo = ConnectionManager::getDataSource('test');
if (!($this->Dbo instanceof Oracle)) {
$this->markTestSkipped('The Oracle extension is not available.');
}
}
/**
* testLastErrorStatement method
*
* @return void
*/
public function testLastErrorStatement() {
$this->expectError();
$this->db->execute("SELECT ' FROM dual");
$e = $this->db->lastError();
$r = 'ORA-01756: quoted string not properly terminated';
$this->assertEqual($e, $r);
}
/**
* testLastErrorConnect method
*
* @return void
*/
public function testLastErrorConnect() {
$config = $this->db->config;
$old_pw = $this->db->config['password'];
$this->db->config['password'] = 'keepmeout';
$this->db->connect();
$e = $this->db->lastError();
$r = 'ORA-01017: invalid username/password; logon denied';
$this->assertEqual($e, $r);
$this->db->config['password'] = $old_pw;
$this->db->connect();
}
/**
* testName method
*
* @return void
*/
public function testName() {
$Db = $this->db;
#$Db = new DboOracle($config = null, $autoConnect = false);
$r = $Db->name($Db->name($Db->name('foo.last_update_date')));
$e = 'foo.last_update_date';
$this->assertEqual($e, $r);
$r = $Db->name($Db->name($Db->name('foo._update')));
$e = 'foo."_update"';
$this->assertEqual($e, $r);
$r = $Db->name($Db->name($Db->name('foo.last_update_date')));
$e = 'foo.last_update_date';
$this->assertEqual($e, $r);
$r = $Db->name($Db->name($Db->name('last_update_date')));
$e = 'last_update_date';
$this->assertEqual($e, $r);
$r = $Db->name($Db->name($Db->name('_update')));
$e = '"_update"';
$this->assertEqual($e, $r);
}
}