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

PHP UNIT tests fail if an activity module doesn't have test module generator

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Steps to test:

      1. Get clean moodle code 
      2. Get activity module without generator lib e.g. mod_lightboxgallery (git clone -b MOODLE_31_STABLE git@github.com:netspotau/moodle-mod_lightboxgallery.git mod/lightboxgallery)
      3. Configure your instance for running unit tests https://docs.moodle.org/dev/PHPUnit
      4. Run tests vendor/bin/phpunit core_calendar_container_testcase calendar/tests/container_test.php

      Expected: test passed.

      Show
      Steps to test: Get clean moodle code  Get activity module without generator lib e.g. mod_lightboxgallery (git clone -b MOODLE_31_STABLE git@github.com:netspotau/moodle-mod_lightboxgallery.git mod/lightboxgallery) Configure your instance for running unit tests https://docs.moodle.org/dev/PHPUnit Run tests vendor/bin/phpunit core_calendar_container_testcase calendar/tests/container_test.php Expected: test passed.
    • Affected Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59474-master-fix-calendar-tests

      Description

      Running PHP UNIT tests on instance with activity module(s) which doesn't have test module generator implemented fail with:

      coding_exception: Coding error detected, it must be fixed by a programmer: Component mod_name does not support generators yet.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmitriim Dmitrii Metelkin
              Reporter:
              dmitriim Dmitrii Metelkin
              Peer reviewer:
              Ankit Agarwal
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: