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:
mark_story 2008-10-07 03:58:04 +00:00
parent 091325bcd1
commit 11a29679e4
2 changed files with 2 additions and 2 deletions

View file

@ -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'));

View file

@ -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']);