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:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user