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

mod/quiz/tests/lib_test.php does not require locallib.php when it should

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.8.3, 2.9
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      Note: You cannot refer to the nightly CI server for this test - the problem does not effect the CI server. Must be run manually

      1. Run vendor/bin/phpunit mod/quiz/tests/lib_test.php
      2. Run vendor/bin/phpunit --testsuite "mod_quiz_testsuite"
      3. Ensure no errors occur
      Show
      Note: You cannot refer to the nightly CI server for this test - the problem does not effect the CI server. Must be run manually Run vendor/bin/phpunit mod/quiz/tests/lib_test.php Run vendor/bin/phpunit --testsuite "mod_quiz_testsuite" Ensure no errors occur
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-49295-master

      Description

      It appears to be missing

      global $CFG;
      require_once($CFG->dirroot . '/mod/quiz/locallib.php');

      This causes the unit test to fail when only that specific test is run

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              johno John Okely
              Reporter:
              johno John Okely
              Peer reviewer:
              Mark Nelson
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: