http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12443
--- Comment #9 from David Cook <[email protected]> --- (In reply to Tomás Cohen Arazi from comment #8) > (In reply to David Cook from comment #7) > > (In reply to Tomás Cohen Arazi from comment #6) > > > I'd like to see some unit tests for such a sensitive core functionality. > > > I know it is an almost trivial change, but we are introducing a new > > > function > > > to C4::Search which needs to be documented (ut-driven documentation). > > > > > > It does, OTOH, look fine to me and would push it soon. If help is needed > > > on > > > writing those tests don't hesitate to write me. > > > > I was thinking about unit tests when I wrote the patch, but I'm not really > > sure what sort of test would be appropriate for this type of function. > > > > I can write the test, but I don't know what to test, if that makes sense. > > You could start by looking at t/db_dependent/Search.t for stuff like this: > > <code> > ( $error, $query, $simple_query, $query_cgi, > $query_desc, $limit, $limit_cgi, $limit_desc, > $stopwords_removed, $query_type ) = buildQuery([ 'and' ], [ 'salud', > 'higiene' ], [], [], [], 0, 'en'); > like($query, qr/kw\W.*salud\W.*and.*kw\W.*higiene/, "Built composed > explicit-and CCL keyword query"); > </code> > > And build scenarios that cover all conditional paths. Since I'm just changing the internals of buildQuery, shouldn't the existing plans cover that though? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://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/
