Unit tests MDL-24976 Fixed conditionlib unit test (also added thing to ensure that debug warning in conditionlib is shown in unit test if applicable)

This commit is contained in:
Sam Marshall 2010-11-02 15:04:21 +00:00
parent 7f91ba532b
commit 72d021a927
2 changed files with 11 additions and 4 deletions

View file

@ -396,8 +396,8 @@ WHERE
$modinfo = get_fast_modinfo($course);
}
if (empty($modinfo->cms[$cmid])) {
global $PAGE;
if (isset($PAGE) && strpos($PAGE->pagetype, 'course-view-')===0) {
global $PAGE, $UNITTEST;
if (!empty($UNITTEST) || (isset($PAGE) && strpos($PAGE->pagetype, 'course-view-')===0)) {
debugging("Warning: activity {$this->cm->id} '{$this->cm->name}' has condition on deleted activity $cmid (to get rid of this message, edit the named activity)");
}
continue;