From: tjhunt Date: Fri, 10 Apr 2009 09:32:53 +0000 (+0000) Subject: simpletestlib: improve failure message from CheckSpecifiedFieldsExpectation X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3efb762e6b108c1f9686cfa811653367d6ef3410;p=moodle.git simpletestlib: improve failure message from CheckSpecifiedFieldsExpectation --- diff --git a/lib/simpletestlib.php b/lib/simpletestlib.php index 885eaad867..2eb6b754ac 100644 --- a/lib/simpletestlib.php +++ b/lib/simpletestlib.php @@ -142,7 +142,7 @@ class CheckSpecifiedFieldsExpectation extends SimpleExpectation { } else if (is_null($value) && is_null($actual->$key)) { // OK } else { - $mismatches[] = $key; + $mismatches[] = $key . ' (expected [' . $value . '] got [' . $actual->$key . '].'; } } return 'Actual object does not have all the same fields with the same values as the expected object (' .