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

PHPUnit execution throwing debugging error on get_fast_modinfo() execution

    Details

    • Testing Instructions:
      Hide

      1) Ensure that both DEBUG_DEVELOPER and display errors are enabled.
      2) Run all phpunit tests (23_STABLE and master)
      3) TEST: Verify there is not any debugging message (+ stack trace) with:

      Debugging: Coding problem - missing course sectioncache property in get_fast_modinfo()

      4) TEST: Verify that there is not any failure/exception related with conditions (conditionlib, condition_info_base...) stuff. In fact you should get 100% pass if your DB (mysql, postgres) is properly configured.

      Show
      1) Ensure that both DEBUG_DEVELOPER and display errors are enabled. 2) Run all phpunit tests (23_STABLE and master) 3) TEST: Verify there is not any debugging message (+ stack trace) with: Debugging: Coding problem - missing course sectioncache property in get_fast_modinfo() 4) TEST: Verify that there is not any failure/exception related with conditions (conditionlib, condition_info_base...) stuff. In fact you should get 100% pass if your DB (mysql, postgres) is properly configured.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      This was detected when running PHPUnit tests from command line and is caused by new debugging details added to get_fast_modinfo() by MDL-34936.

      Along tests execution there are a bunch of message like this (different is_available() call lines):

      Debugging: Coding problem - missing course sectioncache property in get_fast_modinfo() call
      * line 1208 of /lib/modinfolib.php: call to debugging()
      * line 940 of /lib/conditionlib.php: call to get_fast_modinfo()
      * line 280 of /lib/conditionlib.php: call to condition_info_base->is_available()
      * line 654 of /lib/tests/conditionlib_test.php: call to condition_info_section->is_available()
      * line ? of unknownfile: call to conditionlib_testcase->test_section_is_available()

      So I bet tests are missing to pass the corresponding sectioninfo to get_fast_modinfo()

      Ciao

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Sep/12