Skip to content

Conversation

Raza403
Copy link
Contributor

@Raza403 Raza403 commented Aug 5, 2025

This PR is made for #686
@mdjnelson, here is the clean PR for create and delete unit test.

$sink = $this->redirectEvents();

// Trigger event manually.
\mod_customcert\event\issue_created::create([
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than triggering this manually can we please call the functions that trigger this and then check the event is called?

$DB->delete_records('customcert_issues', ['id' => $issueid]);

// Trigger event manually.
\mod_customcert\event\issue_deleted::create([
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than triggering this manually can we please call the functions that trigger this and then check the event is called?

@mdjnelson
Copy link
Owner

Please see comments I left and fix the Moodle Plugin CI complaints.

@Raza403
Copy link
Contributor Author

Raza403 commented Aug 30, 2025

@mdjnelson, please check if it is okay now. The one testcase that is failing is not related to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants