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.
This commit is contained in:
Joel Bradshaw 2013-03-14 14:17:59 -07:00
parent 246c09ae40
commit 12a142d0ca

View file

@ -277,7 +277,6 @@ class CakeTestFixture {
$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;