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

PHPUnit execution throwing debugging error on get_fast_modinfo() execution

    XMLWordPrintable

Details

    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_23_STABLE
    • Easy
    • 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.

    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

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Sam Marshall Sam Marshall
              Aparup Banerjee Aparup Banerjee
              Aparup Banerjee Aparup Banerjee
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Sep/12