mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing issue in CakeTestFixture, where $import'ing models required connection to be specified, default connection should be automatic.
Caused by changes in ClassRegistry::init(). Closes #5519 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7710 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
091325bcd1
commit
11a29679e4
2 changed files with 2 additions and 2 deletions
|
@ -156,7 +156,7 @@ class CakeTestFixtureTest extends CakeTestCase {
|
|||
|
||||
$Fixture =& new CakeTestFixtureImportFixture();
|
||||
$Fixture->fields = $Fixture->records = null;
|
||||
$Fixture->import = array('model' => 'FixtureImportTestModel');
|
||||
$Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'test_suite');
|
||||
$Fixture->init();
|
||||
$this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created'));
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class CakeTestFixture extends Object {
|
|||
if (isset($import['model']) && (class_exists($import['model']) || App::import('Model', $import['model']))) {
|
||||
$connection = isset($import['connection'])
|
||||
? $import['connection']
|
||||
: 'test_suite';
|
||||
: 'default';
|
||||
ClassRegistry::config(array('ds' => $connection));
|
||||
$model =& ClassRegistry::init($import['model']);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue