small formatting issues

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7235 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
DarkAngelBGE 2008-06-22 14:28:45 +00:00
parent 95522fa3a9
commit a0ff55926c
2 changed files with 7 additions and 3 deletions

View file

@ -173,7 +173,8 @@ class CakeTestCase extends UnitTestCase {
$this->_queries = array(
'create' => array(),
'insert' => array(),
'drop' => array());
'drop' => array()
);
foreach ($models as $model) {
$fixture =& new CakeTestFixture($this->db);
@ -374,10 +375,12 @@ class CakeTestCase extends UnitTestCase {
$this->db->cacheSources = false;
$sources = $this->db->listSources();
$this->db->cacheSources = $cacheSources;
foreach ($this->_fixtures as $fixture) {
if (in_array($fixture->table, $sources)) {
$fixture->drop($this->db);
}
$fixture->create($this->db);
}
}

View file

@ -79,6 +79,7 @@ class CakeTestFixture extends Object {
if (isset($import['model']) && (class_exists($import['model']) || App::import('Model', $import['model']))) {
$model =& new $import['model'];
$db =& ConnectionManager::getDataSource($model->useDbConfig);
$db->cacheSources = false;
$this->fields = $model->schema(true);