https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28615
--- Comment #9 from Tomás Cohen Arazi <[email protected]> --- (In reply to David Cook from comment #8) > Ah, here we go: > > https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28477 > > That unit test code could be refined but it works without any mocking. My goal is to make it trivial for devs to test behavior. There's nothing intrinsically bad about mocking the logger. Or doing it your way. You are actually mocking some other part of the same thing (the configuration) and manually capturing STDOUT/STDERR instead of 'the warn trick'. Your code is correct, and makes my point. Compare that boilerplate for just testing the logger is called, to just calling: t::lib::Mocks::mock_logger({warn=>1}); warning_is {}... Anyways, I always like different opinions and am open about this. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
