mirror of
https://github.com/moodle/moodle.git
synced 2025-02-24 03:53:49 +01:00
quiz reports: Fix up unit tests.
This commit is contained in:
parent
a73e1ab4c5
commit
2457254946
@ -14,7 +14,7 @@ global $CFG;
|
||||
require_once($CFG->libdir . '/simpletestlib.php'); // Include the test libraries
|
||||
require_once($CFG->dirroot . '/mod/quiz/report/reportlib.php'); // Include the code to test
|
||||
|
||||
/** This class contains the test cases for the functions in editlib.php. */
|
||||
/** This class contains the test cases for the functions in reportlib.php. */
|
||||
class question_reportlib_test extends UnitTestCase {
|
||||
function test_quiz_report_index_by_keys() {
|
||||
$datum = array();
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Slow Unit tests for (some of) mod/quiz/report/statistics/qstats.php.
|
||||
* Unit tests for (some of) mod/quiz/report/statistics/qstats.php.
|
||||
*
|
||||
* @copyright © 2006 Jamie Pratt
|
||||
* @author me@jamiep.org
|
||||
@ -29,9 +29,9 @@ class quiz_report_qstats_test extends UnitTestCase {
|
||||
function test_qstats() {
|
||||
global $CFG;
|
||||
//data is taken from randomly generated attempts data generated by contrib/tools/generators/qagenerator/
|
||||
$states = $this->get_records_from_csv($CFG->dirroot.'\mod\quiz\report\statistics\simpletest\mdl_question_states.csv');
|
||||
$states = $this->get_records_from_csv($CFG->dirroot.'/mod/quiz/report/statistics/simpletest/mdl_question_states.csv');
|
||||
//data is taken from questions mostly generated by contrib/tools/generators/generator.php
|
||||
$questions = $this->get_records_from_csv($CFG->dirroot.'\mod\quiz\report\statistics\simpletest\mdl_question.csv');
|
||||
$questions = $this->get_records_from_csv($CFG->dirroot.'/mod/quiz/report/statistics/simpletest/mdl_question.csv');
|
||||
$this->qstats = new qstats($questions, 22, 10045.45455);
|
||||
$this->qstats->states = $states;
|
||||
$this->qstats->process_states();
|
Loading…
x
Reference in New Issue
Block a user