]> git.koha-community.org Git - koha.git/commit
Bub 12788: (regression test) refactor facet extraction code to allow testing
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 20 Aug 2014 03:33:40 +0000 (00:33 -0300)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 23 Sep 2014 20:51:54 +0000 (20:51 +0000)
commit5502447d41d93d91bfc9a20201f3049cd9f1642e
tree335990aecaa2b5b713a118dfbdc7ceb27a199a53
parent533d6ed35c4dfa872edaf690fcb8ae05cf017358
Bub 12788: (regression test) refactor facet extraction code to allow testing

This patch refactors the facet extraction loop into a proper function.
The loop is changed so the MARC::Record objects are created only once
instead of the old/current behaviour: once for each defined facet (in
C4::Koha::getFacets).

To test:
- Apply the patch
=> SUCCESS: verify facets functionality remains unchanged.
- Run:
  $ prove -v t/db_dependent/Search.t
=> SUCCESS: tests for _get_facets_data_from_record fail, because
  100$a is considered for fields with indicator 1=z (field added
  by IncludeSeeFromInSearches syspref).
- Sign off :-D

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Search.pm
t/db_dependent/Search.t