Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80927

attempt_walkthrough_from_csv_test is extended by other tests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.2, 4.3.1
    • Unit tests
    • None

      mod/quiz/tests/attempt_walkthrough_from_csv_test.php

      Contains \mod_quiz\attempt_walkthrough_from_csv_test

      It is extended by:

      • \quiz_statistics\stats_from_steps_walkthrough_test
      • \quiz_responses\responses_from_steps_walkthrough_test

      But it is not, itself, a testcase.

      Past experience has shown that it's not a good idea to extend non-abstract test classes. When this has been encountered in the past we've discovered situations where tests have been added for a specific thing, but are then applied to every instance that extends without testing the child target.

      We should:

      • declare \mod_quiz\attempt_walkthrough_from_csv_test as abstract
      • extend it for mod_quiz
      • write a phpcs sniff to make all non-abstract tests final

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.