Fix protected call for _build on CakeSchema, and associated references.

This commit is contained in:
predominant 2010-04-09 20:41:28 +10:00
parent 59fb134455
commit ea635d6bea
2 changed files with 6 additions and 8 deletions

View file

@ -102,7 +102,7 @@ class CakeSchema extends Object {
}
$options = array_merge(get_object_vars($this), $options);
$this->_build($options);
$this->build($options);
}
/**
@ -111,7 +111,7 @@ class CakeSchema extends Object {
* @param array $data loaded object properties
* @return void
*/
protected function _build($data) {
public function build($data) {
$file = null;
foreach ($data as $key => $val) {
if (!empty($val)) {
@ -162,7 +162,7 @@ class CakeSchema extends Object {
$options = array('path' => $options);
}
$this->_build($options);
$this->build($options);
extract(get_object_vars($this));
$class = $name .'Schema';
@ -318,7 +318,7 @@ class CakeSchema extends Object {
public function write($object, $options = array()) {
if (is_object($object)) {
$object = get_object_vars($object);
$this->_build($object);
$this->build($object);
}
if (is_array($object)) {

View file

@ -36,14 +36,12 @@ class CakeTestFixture extends Object {
/**
* Cake's DBO driver (e.g: DboMysql).
*
* @access public
*/
public $db = null;
/**
* Full Table Name
*
* @access public
*/
public $table = null;
@ -131,7 +129,7 @@ class CakeTestFixture extends Object {
return false;
}
$this->Schema->_build(array($this->table => $this->fields));
$this->Schema->build(array($this->table => $this->fields));
return (
$db->execute($db->createSchema($this->Schema), array('log' => false)) !== false
);
@ -144,7 +142,7 @@ class CakeTestFixture extends Object {
* @return boolean True on success, false on failure
*/
public function drop(&$db) {
$this->Schema->_build(array($this->table => $this->fields));
$this->Schema->build(array($this->table => $this->fields));
return (
$db->execute($db->dropSchema($this->Schema), array('log' => false)) !== false
);