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

mod_assign: Use core DI clock to make testing easier

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 5.1
    • Assignment

      It would be useful if mod_assign used the core DI clock which means you can set the current time in PHPunit and Behat tests.

      This is helpful when testing local plugins (or core changes) that may depend on time, for example behaving differently if the cutoff date has passed. While it is also possible to test in Behat using dates such as ## +2 weeks ##, it would be simpler if the facility to set a specific date works, which it will if we use DI clock.

      I think this can be fixed basically by search-replace for time() with a few manual tweaks.

            quen Sam Marshall
            quen Sam Marshall
            Tim Hunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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