http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8798 --- Comment #76 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to comment #72)
I agree with unit testable-ness for functions, but what about scripts? One of the great reasons to have DBIC is we can just use find() or single() to grab a borrower in the script, rather than calling C4::Members::GetMember. Script mods should of course have a full and thorough test plan, but I can't imagine them being unit testable, right?
That depends on how one writes them. If we think of a "script" as most of the time being a wrapper that gathers command-line parameters, then calls one or more functions or methods that exist in the Koha namespace, those functions can readily be included in the Test::More-based tests. In other words, we should encourage writing scripts in such a way that unit tests of their core functionality can be easily written. -- You are receiving this mail because: You are watching all bug changes.