[Koha-bugs] [Bug 33718] _new_Zconn crashes on a bug in t::lib::Mocks::mock_config

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 11 14:59:37 CEST 2023


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

--- Comment #4 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 151074
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151074&action=edit
Bug 33718: Fix the mock of Koha::Config->get in mock_config

It should not mock calls for other sections than 'config' in
koha-conf.xml.

Test plan:
Without this patch:
[1] Enable CatalogModuleRelink and LinkerRelink. This will trigger
a SearchAuthorities call when creating a sample biblio.
Note: SearchAuthorities calls Zconn and gets back information from
a wrong part of koha-conf.xml.
[2] Run t/db_dependent/Koha/Pseudonymization.t
You should see something like:
  {UNKNOWN}: Can't use string ("authorities") as a HASH ref while "strict refs"
in use at /usr/share/koha/C4/Context.pm line 587. at
/usr/share/koha/C4/Biblio.pm line 302

With this patch:
[3] Run t/db_dependent/Koha/Pseudonymization.t. Should pass now.

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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


More information about the Koha-bugs mailing list