[Koha-bugs] [Bug 28615] Add a simple way to mock Koha::Logger

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 23 13:37:29 CEST 2021


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

--- Comment #13 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Jonathan Druart from comment #12)
> Wondering if we shouldn't use a mix of:
> * https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120417
> * what we have in t/Logger.t
> 
> Basically it would mock log4perl_conf for the current prove command.
> 
> But it needs to be "more global" or it won't work. Should not we actually
> copy $KOHA_CONF, modify it, and set KOHA_CONF to the new file for the
> current prove command?

I don't fully understand the added value of having a full blown log4perl setup
when we only want to test if log4perl is called and how. Maybe we are thinking
about different things.

If we were to use something like that, I'd suggest using Test::Output as
suggested by David so writing tests for those calls is less painful.

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


More information about the Koha-bugs mailing list