MDL-47813 tool_monitor: Fix rule manager unit tests in oracle

This commit is contained in:
John Okely 2014-10-24 10:38:30 +08:00 committed by Eloy Lafuente (stronk7)
parent fad1a02d21
commit 4809376f13

View File

@ -126,7 +126,7 @@ class tool_monitor_rule_manager_testcase extends advanced_testcase {
$rule = $monitorgenerator->create_rule($record2); // Create rules in a different course.
}
$ruledata = \tool_monitor\rule_manager::get_rules_by_courseid($course1->id);
$this->assertEquals($ruleids, array_keys($ruledata));
$this->assertEmpty(array_merge(array_diff(array_keys($ruledata), $ruleids), array_diff($ruleids, array_keys($ruledata))));
$this->assertCount(20, $ruledata);
}
@ -153,7 +153,7 @@ class tool_monitor_rule_manager_testcase extends advanced_testcase {
}
$ruledata = \tool_monitor\rule_manager::get_rules_by_plugin('core');
$this->assertEquals($ruleids, array_keys($ruledata));
$this->assertEmpty(array_merge(array_diff(array_keys($ruledata), $ruleids), array_diff($ruleids, array_keys($ruledata))));
$this->assertCount(10, $ruledata);
}