[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
Wed Jul 3 23:19:24 CEST 2019


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

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #91223|0                           |1
        is obsolete|                            |

--- Comment #12 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 91244
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91244&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.

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

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


More information about the Koha-bugs mailing list