]> git.mjollnir.org Git - moodle.git/commitdiff
simpletestlib: improve failure message from CheckSpecifiedFieldsExpectation
authortjhunt <tjhunt>
Fri, 10 Apr 2009 09:32:53 +0000 (09:32 +0000)
committertjhunt <tjhunt>
Fri, 10 Apr 2009 09:32:53 +0000 (09:32 +0000)
lib/simpletestlib.php

index 885eaad86751b91556f0662177d96c415a1e8209..2eb6b754acb7ab445556063518b16830f6dac92f 100644 (file)
@@ -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 (' .