Skip to content
Permalink
Browse files

Revert "No truncate when drop table."

  • Loading branch information...
dereuromark committed Jun 30, 2014
1 parent a966f08 commit 1686edf01624313962aa167a7001245dd4d044ae
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
@@ -229,9 +229,7 @@ public function load(CakeTestCase $test) {
$db = ConnectionManager::getDataSource($fixture->useDbConfig);
$db->begin();
$this->_setupTable($fixture, $db, $test->dropTables);
if (!$test->dropTables) {
$fixture->truncate($db);
}
$fixture->truncate($db);
$fixture->insert($db);
$db->commit();
}
@@ -276,9 +274,7 @@ public function loadSingle($name, $db = null, $dropTables = true) {
$db = ConnectionManager::getDataSource($fixture->useDbConfig);
}
$this->_setupTable($fixture, $db, $dropTables);
if (!$dropTables) {
$fixture->truncate($db);
}
$fixture->truncate($db);
$fixture->insert($db);
} else {
throw new UnexpectedValueException(__d('cake_dev', 'Referenced fixture class %s not found', $name));

0 comments on commit 1686edf

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