Make the error message better for fixture errors

The stack trace has no details about which fixture is the actual problem.
This commit is contained in:
Carl Sutton 2014-07-15 13:21:48 +01:00
parent 070d80029f
commit 8d58d93636

View file

@ -289,7 +289,7 @@ class CakeTestFixture {
foreach ($this->records as $record) {
$merge = array_values(array_merge($default, $record));
if (count($fields) !== count($merge)) {
throw new CakeException('Fixture invalid: Count of fields does not match count of values');
throw new CakeException('Fixture invalid: Count of fields does not match count of values in ' . get_class($this));
}
$values[] = $merge;
}