Details
-
Task
-
Resolution: Fixed
-
Minor
-
3.3
-
MOODLE_33_STABLE
-
MOODLE_33_STABLE
-
wip-
MDL-58911-master -
Description
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
Attachments
Issue Links
- Discovered while testing
-
MDL-58867 Fatal errors when trying to create an action calendar event outside of the module
-
- Closed
-