Changing cake_test_fixture::init() to not alter ClassRegistry::config() settings. Instead model is built with ds parameter. Closes #5578.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7746 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-10-15 16:50:10 +00:00
parent 19975a2cf6
commit cdc12d9eb8

View file

@ -79,8 +79,7 @@ class CakeTestFixture extends Object {
$connection = isset($import['connection'])
? $import['connection']
: 'default';
ClassRegistry::config(array('ds' => $connection));
$model =& ClassRegistry::init($import['model']);
$model =& ClassRegistry::init(array('class' => $import['model'], 'ds' => $connection));
$db =& ConnectionManager::getDataSource($model->useDbConfig);
$db->cacheSources = false;