unit tests: MDL-22175 Further improvements unit test failure display.

Exceptions are now also shown with a pruned stack trace.
And 2.0 code for displaying PHP5 error types backported to 1.9.
This commit is contained in:
Tim Hunt
2010-04-23 17:22:54 +00:00
parent a6fbcfa0aa
commit 7e3078db0a
3 changed files with 71 additions and 4 deletions
+8
View File
@@ -210,6 +210,14 @@
E_USER_ERROR => 'E_USER_ERROR',
E_USER_WARNING => 'E_USER_WARNING',
E_USER_NOTICE => 'E_USER_NOTICE');
// Moodle additions, to prevent notices in PHP5.
if (defined('E_RECOVERABLE_ERROR')) {
$map[E_RECOVERABLE_ERROR] = 'E_RECOVERABLE_ERROR';
}
if (defined('E_DEPRECATED')) {
$map[E_DEPRECATED] = 'E_DEPRECATED';
}
// End Moodle additions.
return $map[$severity];
}
}