Skip to content
Permalink
Browse files

Make protected method protected.

PHPUnit loses its lunch when trait methods are renamed. This change also
simplifies the classes using PDODriverTrait.
  • Loading branch information...
markstory committed Mar 24, 2013
1 parent 40389af commit 4263940ed51180bf4d6b2d3ac54f2c08b963adda
@@ -17,13 +17,13 @@
*/
namespace Cake\Model\Datasource\Database\Driver;
use Cake\Model\Datasource\Database\Dialect\MysqlDialectTrait;
use PDO;
class Mysql extends \Cake\Model\Datasource\Database\Driver {
use PDODriverTrait {
connect as protected _connect;
}
use PDODriverTrait;
use MysqlDialectTrait;
/**
* Base configuration settings for MySQL driver
@@ -28,7 +28,7 @@ trait PDODriverTrait {
* @param array $config configuration to be used for creating connection
* @return boolean true on success
*/
public function connect(array $config) {
protected function _connect(array $config) {
$connection = new PDO(
$config['dsn'],
$config['login'],
@@ -46,7 +46,7 @@ public function connect(array $config) {
*
* @return mixed connection object used internally
*/
public function connection($connection = null) {
public function connection($connection = null) {
if ($connection !== null) {
$this->_connection = $connection;
}
@@ -23,9 +23,7 @@
class Postgres extends \Cake\Model\Datasource\Database\Driver {
use PDODriverTrait {
connect as protected _connect;
}
use PDODriverTrait;
use PostgresDialectTrait;
/**
@@ -23,9 +23,7 @@
class Sqlite extends \Cake\Model\Datasource\Database\Driver {
use PDODriverTrait {
connect as protected _connect;
}
use PDODriverTrait;
use SqliteDialectTrait;
/**

0 comments on commit 4263940

Please sign in to comment.
You can’t perform that action at this time.