]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Tue, 23 Aug 2022 17:15:18 +0000 (17:15 +0000)
commite9fde507b643b0f8b2605f3fea838860d1a01261
treed552b459fb9bc306e22abad0024942ae347952be
parente90ddc67cf95bfeaf6da95711e6bd031708979cb
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>
(cherry picked from commit ecd91d608914aa04660b3f83e9337effbed3822e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/SuggestionEngine/Plugin/ExplodedTerms.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/text/explodedterms.tt [deleted file]
t/db_dependent/SuggestionEngine_ExplodedTerms.t