]> git.koha-community.org Git - koha.git/commit
Bug 31069: Remove ExplodedTerms dependency on templates
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 18 Jul 2022 15:33:47 +0000 (12:33 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 18 Jul 2022 15:37:35 +0000 (12:37 -0300)
commitecd91d608914aa04660b3f83e9337effbed3822e
tree236aba2b7ad49a4bd84545df87265c964232f7ed
parent1857b29ee64ea6c509580594e6d1a025a136443b
Bug 31069: Remove ExplodedTerms dependency on templates

This patch removes the use of templates and CGI in ExplodedTerms by using the
Koha::I18N library.

The functionality on the package is too simple, and messing with the
template paths complexity on the tests was too much, given we have a
nice way to have translatable strings at the package level.

This patch does that, and cleans up the test file as well, that required
complex template and CGI mocking to run properly.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
=> FAIL: It fails in master
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Follow the original test plan
=> SUCCESS: Things work
5. Enjoy the rest of the day and forget this ever happened

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/SuggestionEngine/Plugin/ExplodedTerms.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/text/explodedterms.tt [deleted file]
t/db_dependent/SuggestionEngine_ExplodedTerms.t