Skip to content
Permalink
Browse files

Mark fixtures as created if they exist.

Fixes #2905
  • Loading branch information...
markstory committed Jun 24, 2012
1 parent b913fe5 commit 503bc06c703e12d3335b51c268699f4e80508ae2
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
@@ -169,12 +169,15 @@ protected function _setupTable($fixture, $db = null, $drop = true) {
$sources = $db->listSources();
$table = $db->config['prefix'] . $fixture->table;
$exists = in_array($table, $sources);
if ($drop && in_array($table, $sources)) {
if ($drop && $exists) {
$fixture->drop($db);
$fixture->create($db);
} elseif (!in_array($table, $sources)) {
} elseif (!$exists) {
$fixture->create($db);
} else {
$fixture->created[] = $db->configKeyName;
}
}

0 comments on commit 503bc06

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