From: nicolasconnault Date: Thu, 27 Mar 2008 17:08:55 +0000 (+0000) Subject: MDL-14065 Commented out buggy backuplib tests, and replaced E_ALL with DEBUG_DEVELOPE... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=95c2d696c46931b17b4e958aa2e7fbe2393986ce;p=moodle.git MDL-14065 Commented out buggy backuplib tests, and replaced E_ALL with DEBUG_DEVELOPER in dmllib tests --- diff --git a/lib/simpletest/testbackuplib.php b/lib/simpletest/testbackuplib.php index 874b5936ed..941a5ddfa5 100644 --- a/lib/simpletest/testbackuplib.php +++ b/lib/simpletest/testbackuplib.php @@ -47,6 +47,9 @@ class backuplib_test extends UnitTestCase { var $db; var $testfiles = array(); var $userbasedir; + + /* The mocking of the $rs and $db objects is problematic. Somehow it's affecting other unit test suites. + I'm commenting this off until this is resolved -- nicolasconnault@gmail.com -- function setUp() { global $db, $CFG; @@ -115,9 +118,7 @@ class backuplib_test extends UnitTestCase { } } - /** - * This is a moodlelib method but it is used in backuplib, so it is tested here in that context, with typical backup data. - */ + // This is a moodlelib method but it is used in backuplib, so it is tested here in that context, with typical backup data. function test_get_user_directories() { global $CFG; $dirlist = get_user_directories(); @@ -132,6 +133,7 @@ class backuplib_test extends UnitTestCase { $this->assertEqual($this->userbasedir, $dirlist[$userid]['basedir']); } } + */ } ?> diff --git a/lib/simpletest/testdmllib.php b/lib/simpletest/testdmllib.php index dfa2f6c5f3..6767e227b6 100644 --- a/lib/simpletest/testdmllib.php +++ b/lib/simpletest/testdmllib.php @@ -90,7 +90,7 @@ class datalib_test extends prefix_changing_test_case { ob_end_clean(); $this->assertEqual('', $result, '%s (No error ouside debug mode).'); - $CFG->debug = E_ALL; + $CFG->debug = DEBUG_DEVELOPER; ob_start(); $record = get_record($this->table, 'textfield', 'tadpole'); $result = ob_get_contents(); @@ -132,7 +132,7 @@ class datalib_test extends prefix_changing_test_case { ob_end_clean(); $this->assertEqual('', $result, '%s (No error ouside debug mode).'); - $CFG->debug = E_ALL; + $CFG->debug = DEBUG_DEVELOPER; ob_start(); $record = get_record_sql("SELECT * FROM {$CFG->prefix}" . $this->table . " WHERE textfield = 'tadpole'"); $result = ob_get_contents(); @@ -166,7 +166,7 @@ class datalib_test extends prefix_changing_test_case { ob_end_clean(); $this->assertEqual('', $result, '%s (No error ouside debug mode).'); - $CFG->debug = E_ALL; + $CFG->debug = DEBUG_DEVELOPER; ob_start(); $record = get_record_select($this->table, "textfield = 'tadpole'"); $result = ob_get_contents();