[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
Tue Jul 6 14:03:12 CEST 2021


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

--- Comment #33 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Jonathan Druart from comment #32)
> I thought we would need to mock it for every test where Koha::Logger was
> used.
> 
> But I added a Koha::Logger->get->warn call to AddIssue and
> t/db_dependent/Circulation.t is passing.

Maybe we need to do something along this lines, so no call to the logger
remains untested:

https://metacpan.org/dist/Test-NoWarnings/source/lib/Test/NoWarnings.pm#L45

I thought about writing something like that but wasn't sure, and decided to see
how things go with the implementation I proposed.

> Did you explain why t/Auth_with_shibboleth.t was failing with the following
> error/warning?
> t/Auth_with_shibboleth.t .. 1/17 Log::Log4perl configuration looks
> suspicious: No loggers defined at /usr/share/perl5/Log/Log4perl/Config.pm
> line 325.

That error points to an empty configuration. Not sure what you mean.

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


More information about the Koha-bugs mailing list