[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 14:19:53 CEST 2019


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

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #90950|0                           |1
        is obsolete|                            |
  Attachment #90951|0                           |1
        is obsolete|                            |
  Attachment #91186|0                           |1
        is obsolete|                            |

--- Comment #7 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 91223
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91223&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>

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


More information about the Koha-bugs mailing list