MDL-39474 introduce $CFG->debugdeveloper and cleanup $CFG init
This commit is contained in:
@@ -198,6 +198,7 @@ unset($productioncfg);
|
||||
|
||||
// force the same CFG settings in all sites
|
||||
$CFG->debug = (E_ALL | E_STRICT); // can not use DEBUG_DEVELOPER yet
|
||||
$CFG->debugdeveloper = true;
|
||||
$CFG->debugdisplay = 1;
|
||||
error_reporting($CFG->debug);
|
||||
ini_set('display_errors', '1');
|
||||
|
||||
@@ -248,7 +248,8 @@ abstract class advanced_testcase extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all previous debugging messages in current test.
|
||||
* Clear all previous debugging messages in current test
|
||||
* and revert to default DEVELOPER_DEBUG level.
|
||||
*/
|
||||
public function resetDebugging() {
|
||||
phpunit_util::reset_debugging();
|
||||
|
||||
@@ -594,6 +594,7 @@ class phpunit_util extends testing_util {
|
||||
*/
|
||||
public static function reset_debugging() {
|
||||
self::$debuggings = array();
|
||||
set_debugging(DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -65,9 +65,10 @@ class core_phpunit_advanced_testcase extends advanced_testcase {
|
||||
$debuggings = $this->getDebuggingMessages();
|
||||
$this->assertEquals(0, count($debuggings));
|
||||
|
||||
$CFG->debug = DEBUG_NONE;
|
||||
set_debugging(DEBUG_NONE);
|
||||
debugging('hokus');
|
||||
$this->assertDebuggingNotCalled();
|
||||
set_debugging(DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
public function test_set_user() {
|
||||
|
||||
Reference in New Issue
Block a user