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

Allow to unittest dashboard events WITH module callbacks

XMLWordPrintable

      Discovered while working on MDL-58867, I tried to cover the problem with unittests but it did not work because unittests substitute the callback
      https://github.com/moodle/moodle/blob/master/calendar/classes/local/event/container.php#L100

      Therefore the code that had an error and was actually changed in MDL-58867 is completely impossible to unittests.

      At least we could add some option/setting that allows to use 'production' callback inside unittests.
      I would also vote for completely removing this production/testing switch because it is not how moodle works everywhere else, it is not expected by developers. I myself spent lots of time trying to understand why my events are not filtered when they should be in the unittest and was trying to find an non-existing error in my code

            marina Marina Glancy
            marina Marina Glancy
            Ryan Wyllie Ryan Wyllie
            Jun Pataleta Jun Pataleta
            John Okely John Okely
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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