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

Question version test fails when running testcase in isolation

XMLWordPrintable

      $ vendor/bin/phpunit question/tests/version_test.php 
      Moodle 4.3dev (Build: 20230424), 4e632b72518d86f069839620cca270911e09b29a
      Php: 8.0.28, mysqli: 8.0.33, OS: Linux 5.4.0-147-generic x86_64
      PHPUnit 9.5.27 by Sebastian Bergmann and contributors.
       
      ...E..                                                              6 / 6 (100%)
       
      Time: 00:02.227, Memory: 64.50 MB
       
      There was 1 error:
       
      1) core_question\version_test::test_move_category_with_questions
      Error: Undefined constant "qbank_managecategories\DEFAULT_QUESTIONS_PER_PAGE"
       
      /mnt/export/moodle/master/src/question/bank/managecategories/classes/question_category_list.php:83
      /mnt/export/moodle/master/src/lib/listlib.php:516
      /mnt/export/moodle/master/src/lib/listlib.php:233
      /mnt/export/moodle/master/src/question/bank/managecategories/classes/question_category_object.php:137
      /mnt/export/moodle/master/src/question/bank/managecategories/classes/question_category_object.php:109
      /mnt/export/moodle/master/src/question/tests/version_test.php:208
      /mnt/export/moodle/master/src/lib/phpunit/classes/advanced_testcase.php:94
       
      ERRORS!
      Tests: 6, Assertions: 17, Errors: 1.
      

      Regression from MDL-74041 (4.1) - usage of a constant without requiring the library that defines said constant

            pholden Paul Holden
            pholden Paul Holden
            Tim Hunt Tim Hunt
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 39 minutes
                39m

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