Merge branch 'w12_MDL-44339_m27_testdebug' of git://github.com/skodak/moodle

This commit is contained in:
Marina Glancy 2014-03-17 13:48:27 +08:00
commit 3b85de7b99

View file

@ -82,8 +82,11 @@ abstract class advanced_testcase extends PHPUnit_Framework_TestCase {
$DB = phpunit_util::get_global_backup('DB');
// Deal with any debugging messages.
phpunit_util::display_debugging_messages();
$debugerror = phpunit_util::display_debugging_messages();
phpunit_util::reset_debugging();
if ($debugerror) {
trigger_error('Unenxpected debugging() call detected.', E_USER_NOTICE);
}
} catch (Exception $e) {
// cleanup after failed expectation