Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove key-ordering sensitivity in fixtures

Previously, the field order was effectively taken from the last record in the fixture, but the values were ordered according to the array_unique call above - primarily determined by the first record in the fixture.  If these two orders differed, values were added under the wrong keys.
  • Loading branch information...
commit 12a142d0ca07153c1574f21b205c020ee9efca90 1 parent 246c09a
@cincodenada cincodenada authored
Showing with 0 additions and 1 deletion.
  1. +0 −1  lib/Cake/TestSuite/Fixture/CakeTestFixture.php
View
1  lib/Cake/TestSuite/Fixture/CakeTestFixture.php
@@ -277,7 +277,6 @@ public function insert($db) {
$fields = array_unique($fields);
$default = array_fill_keys($fields, null);
foreach ($this->records as $record) {
- $fields = array_keys($record);
$values[] = array_values(array_merge($default, $record));
}
$nested = $db->useNestedTransactions;
Please sign in to comment.
Something went wrong with that request. Please try again.