http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7067 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #125 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to comment #123)
There are no unit tests for Koha::Borrower::Modifications, nor for the AddMember_Opac routine (any other routines added should also have unit tests, of course). Starting with the 3.12 release cycle, unit tests are required for code added to the Koha:: and C4:: namespaces.
Add a Unit Test.
Also, please use hashrefs rather than hashes as arguments in the Koha:: namespace. I could have sworn you did a follow-up changing all the hash arguments to hashrefs but I don't see it anywhere, even among the obsolete patches.
Fixed
Other notes: * Do not access the database in BEGIN {} blocks, especially not in the Koha:: namespace.
Fixed
* Use of C4::SQLHelper from the Koha:: namespace. Calling into the C4:: namespace from Koha:: is not supposed to be done. If that was the only objection, I would probably push it anyway, at least this time, but arguably I probably shouldn't.
This is the only one I haven't changed. Once we have DBIx::Class support, I pledge to switch this module from C4::SQLHelper to that.
* Package-level my variables are verboten, since they break persistence, and replacing "my" with "our" should be done only under extreme duress, and never in new code (note: you can use our when it's called for by the code, just not as a workaround for my not working under Plack).
Fixed
* Object-oriented classes do not export routines and therefore should not use Exporter. Even procedural classes that do not export any routines should not use Exporter.
Fixed
* When creating ->new() subroutines, the following idiom may be useful: return bless( { 'verification_token' => $args{'verification_token'}, ... }, $class );
Or even: return bless( $args, $class );
Fixed -- You are receiving this mail because: You are watching all bug changes.