MDL-67673 phpunit: Move tests to use new phpunit_dataset
[moodle.git] / mod / quiz / report / responses / tests / responses_from_steps_walkthrough_test.php
index 2b63724..f4b74f1 100644 (file)
@@ -53,8 +53,7 @@ class quiz_report_responses_from_steps_testcase extends mod_quiz_attempt_walkthr
      * Create a quiz add questions to it, walk through quiz attempts and then check results.
      *
      * @param array $quizsettings settings to override default settings for quiz created by generator. Taken from quizzes.csv.
-     * @param PHPUnit\DbUnit\DataSet\ITable[] $csvdata of data read from csv file "questionsXX.csv",
-     *                                                                                  "stepsXX.csv" and "responsesXX.csv".
+     * @param array $csvdata of data read from csv file "questionsXX.csv", "stepsXX.csv" and "responsesXX.csv".
      * @dataProvider get_data_for_walkthrough
      */
     public function test_walkthrough_from_csv($quizsettings, $csvdata) {
@@ -66,8 +65,7 @@ class quiz_report_responses_from_steps_testcase extends mod_quiz_attempt_walkthr
 
         $quizattemptids = $this->walkthrough_attempts($csvdata['steps']);
 
-        for ($rowno = 0; $rowno < $csvdata['responses']->getRowCount(); $rowno++) {
-            $responsesfromcsv = $csvdata['responses']->getRow($rowno);
+        foreach ($csvdata['responses'] as $responsesfromcsv) {
             $responses = $this->explode_dot_separated_keys_to_make_subindexs($responsesfromcsv);
 
             if (!isset($quizattemptids[$responses['quizattempt']])) {