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

Authentication methods do not test for events

XMLWordPrintable

    • MOODLE_29_STABLE

      As part of MDL-49022 I've been looking at implementing a unit test to ensure that the correct events are called when certain methods are triggered.

      It seems that there are no such unit tests on any authentication modules which might explain why missing event triggers are slipping through the net.

      Would it be worth implementing some standard event tests on all authentication modules which check for events being triggered on method calls:
      .

      • $auth->user_signup() should trigger core\event\user_created
      • $auth->user_update() should trigger core\event\user_updated
      • $auth->user_delete() should trigger core\event\user_deleted

      Clearly there will still need to be bespoke tests implemented for the non-standard methods (for example sync_users() in auth_ldap), however these would be a good starter.

            Unassigned Unassigned
            markdw Mark Ward
            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.