Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mark fixtures as created if they exist.

Fixes #2905
  • Loading branch information...
commit 503bc06c703e12d3335b51c268699f4e80508ae2 1 parent b913fe5
@markstory markstory authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
View
7 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;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.