[Koha-bugs] [Bug 22709] Add hooks to notify plugins of biblio and item changes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 24 16:57:11 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22709

--- Comment #2 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 90950
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90950&action=edit
Bug 22709: Unit tests

This patch introduces tests for new plugin hooks added to
C4::Biblio::{Add|Mod|Del}Biblio and C4::Items::{Add|Mod|Del}Item.

They are tested together as for creating an item you need to first create
a biblio and tests looks basically the same.

The testing strategy is
- Make sure the plugin is passed the right params
- Throw an exception at plugin-level, to be trapped by the C4::Biblio
and C4::Items lib, and converted into a warning. So we test for the
warning.
- Also, the fact that C4::Biblio and C4::Items warns, means the
exception was cought, and then Koha won't break on faulty plugins or
fatal errors from plugins.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list