Skip to content
Permalink
Browse files

Start and end transactions on the fixtures datasource.

Fixes #3490
  • Loading branch information...
markstory committed Jan 5, 2013
1 parent 6d74397 commit ac1f64abc9ee3253e0a40ae07f614a4b1fd4035e
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
@@ -204,19 +204,16 @@ public function load(CakeTestCase $test) {
return;
}
$nested = $test->db->useNestedTransactions;
$test->db->useNestedTransactions = false;
$test->db->begin();
foreach ($fixtures as $f) {
if (!empty($this->_loaded[$f])) {
$fixture = $this->_loaded[$f];
$db = ConnectionManager::getDataSource($fixture->useDbConfig);
$db->begin();
$this->_setupTable($fixture, $db, $test->dropTables);
$fixture->insert($db);
$db->commit();
}
}
$test->db->commit();
$test->db->useNestedTransactions = $nested;
}
/**

0 comments on commit ac1f64a

Please sign in to comment.
You can’t perform that action at this time.