]> git.koha-community.org Git - koha.git/commit
Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t
authorMark Tompsett <mtompset@hotmail.com>
Thu, 7 Jul 2016 06:34:28 +0000 (02:34 -0400)
committerJulian Maurice <julian.maurice@biblibre.com>
Tue, 16 Aug 2016 15:02:24 +0000 (17:02 +0200)
commit08709ba1e66dc2263d1d732d5503e34b8d32fcea
treef3a32c2ca0f679afa6af2597c4e8b22e0c6aef53
parent936a8892ae31159a96ce0be37cbc328ba647eb70
Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t

By properly defining a opachtdocs (intranethtdocs was done too)
in the mock function, uninitialized variable warnings are
eliminated. Given that we can check if $KOHA_CONF is defined or
not, we can catch the warning as part of testing, so the output
of the test is cleaner.

TEST PLAN
---------
1) unset KOHA_CONF
2) prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- lots of noise
3) apply patch
4) prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- no noise
5) prove -v t/db_dependent/SuggestionEngine_ExplodedTerms.t
   -- see the warnings were caught and not just ignored.
6) run koha qa test tools

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
No warnings. Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5ec641fbbb67501e2a71be64b12c9224caee1b55)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 5129b29b02f1b4f586a0c6bc943f8cea8f605619)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
t/db_dependent/SuggestionEngine_ExplodedTerms.t [changed mode: 0755->0644]