Skip to content

Commit

Permalink
Removing reference operators in CakeTestFixture..
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 15, 2010
1 parent 7705c40 commit 20b0b1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cake/tests/lib/cake_test_fixture.php
Expand Up @@ -24,7 +24,7 @@
* @package cake
* @subpackage cake.cake.tests.lib
*/
class CakeTestFixture extends Object {
class CakeTestFixture {

/**
* Name of the object
Expand Down Expand Up @@ -69,16 +69,16 @@ public function init() {

if (isset($import['model']) && App::import('Model', $import['model'])) {
ClassRegistry::config(array('ds' => $import['connection']));
$model =& ClassRegistry::init($import['model']);
$db =& ConnectionManager::getDataSource($model->useDbConfig);
$model = ClassRegistry::init($import['model']);
$db = ConnectionManager::getDataSource($model->useDbConfig);
$db->cacheSources = false;
$this->fields = $model->schema(true);
$this->fields[$model->primaryKey]['key'] = 'primary';
ClassRegistry::config(array('ds' => 'test_suite'));
ClassRegistry::flush();
} elseif (isset($import['table'])) {
$model =& new Model(null, $import['table'], $import['connection']);
$db =& ConnectionManager::getDataSource($import['connection']);
$model = new Model(null, $import['table'], $import['connection']);
$db = ConnectionManager::getDataSource($import['connection']);
$db->cacheSources = false;
$model->useDbConfig = $import['connection'];
$model->name = Inflector::camelize(Inflector::singularize($import['table']));
Expand Down

0 comments on commit 20b0b1f

Please sign in to comment.