moodle-mod_customcert icon indicating copy to clipboard operation
moodle-mod_customcert copied to clipboard

Add unit tests for issue_created, issue_deleted

Open fulldecent opened this issue 6 months ago • 10 comments

Extending https://github.com/mdjnelson/moodle-mod_customcert/issues/675

We now have events for certificate issue, actions, and now we just need to add testing for them.

Work plan

  • [ ] Rebase all branches in https://github.com/modern-training-solutions/moodle-mod_customcert on top of updated latest code in mdjnelson origin.
  • [x] Check that we are not using the old event name (certificate_issued) in our production environment. (Good, we are not.)
  • [ ] Implement unit tests in new work branch in https://github.com/modern-training-solutions/moodle-mod_customcert
  • [ ] @fulldecent to make PR here.

fulldecent avatar May 27 '25 15:05 fulldecent

Hi @Raza403 I am ready for this one so we can start loading certificates into CMS when students get their eCard.

Can you please discuss any questions so we can get this to READY status on our board?

fulldecent avatar Jun 04 '25 03:06 fulldecent

Please see https://github.com/mdjnelson/moodle-mod_customcert/blob/MOODLE_500_STABLE/tests/event/events_test.php for how to write unit tests for events.

mdjnelson avatar Jun 09 '25 11:06 mdjnelson

Rebase all branches in https://github.com/modern-training-solutions/moodle-mod_customcert on top of updated latest code in mdjnelson origin.

Rebased.

Image

Raza403 avatar Jul 05 '25 13:07 Raza403

Sorry, is this related to creating unit tests? I don't see anything on that branch about unit tests. Also, please create a PR rather than linking to the branch as you have done before. :)

mdjnelson avatar Jul 06 '25 11:07 mdjnelson

Can you please create unit tests for this please @Raza403?

mdjnelson avatar Jul 13 '25 13:07 mdjnelson

@mdjnelson I am working on it, will make a PR next week.

Raza403 avatar Jul 13 '25 14:07 Raza403

Thanks, it's much appreciated.

mdjnelson avatar Jul 13 '25 14:07 mdjnelson

Hi @mdjnelson the first step here is that our own fork of this project needs to rebase all work ontop of your latest version here.

This is an internal step for my team. No action or review is required from you on this step. It is strictly FYI as we are building in public.

We have not started adding unit tests. But when we do, it will be a branch living at https://github.com/modern-training-solutions/moodle-mod_customcert. And yes, when we have some progress I will indeed create a PR here.

fulldecent avatar Jul 14 '25 18:07 fulldecent

Thanks @fulldecent.

mdjnelson avatar Jul 28 '25 11:07 mdjnelson

PR made here.

Raza403 avatar Aug 05 '25 12:08 Raza403