mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-28 12:42:58 +00:00
Removing reference operators in CakeTestFixture..
This commit is contained in:
parent
7705c404ee
commit
20b0b1ff58
1 changed files with 5 additions and 5 deletions
|
@ -24,7 +24,7 @@
|
|||
* @package cake
|
||||
* @subpackage cake.cake.tests.lib
|
||||
*/
|
||||
class CakeTestFixture extends Object {
|
||||
class CakeTestFixture {
|
||||
|
||||
/**
|
||||
* Name of the object
|
||||
|
@ -69,16 +69,16 @@ class CakeTestFixture extends Object {
|
|||
|
||||
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']));
|
||||
|
|
Loading…
Add table
Reference in a new issue