From 8d58d936360451c96242a1c5bf9803ece769d64c Mon Sep 17 00:00:00 2001 From: Carl Sutton Date: Tue, 15 Jul 2014 13:21:48 +0100 Subject: [PATCH] Make the error message better for fixture errors The stack trace has no details about which fixture is the actual problem. --- lib/Cake/TestSuite/Fixture/CakeTestFixture.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php index c966befabb3..329eef27f39 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php @@ -289,7 +289,7 @@ public function insert($db) { 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; }