From 213401821d56087e96da7383b1eb6ff5a97dbdad Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 7 Jun 2016 01:42:59 +0000 Subject: [PATCH] Bug 16675: fix breakage of t/Languages.t MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes test breakage introduced by the patch for bug 16088, which added caching of getlanguages(). Upon inspection, it looks like the patch for 16088 does not introduce a regression on bug 10560, so this patch adds a couple cache-clearings. To test ------- [1] Verify that t/Languages.t passes. Signed-off-by: Galen Charlton Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit b9b4eeb849dcb52053a98440e1d8fb02011a9005) Signed-off-by: Frédéric Demians --- t/Languages.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/Languages.t b/t/Languages.t index 8fee2001e7..edd2a5ad1a 100644 --- a/t/Languages.t +++ b/t/Languages.t @@ -21,6 +21,7 @@ use Modern::Perl; use Test::More tests => 4; use Test::MockModule; use CGI qw ( -utf8 ); +use Koha::Cache::Memory::Lite; BEGIN { use_ok('C4::Languages'); @@ -51,8 +52,10 @@ my $query = CGI->new(); @languages = ('de-DE', 'fr-FR'); is(C4::Languages::getlanguage($query), 'de-DE', 'default to first language specified in syspref (bug 10560)'); +Koha::Cache::Memory::Lite->get_instance()->clear_from_cache('getlanguage'); @languages = (); is(C4::Languages::getlanguage($query), 'en', 'default to English if no language specified in syspref (bug 10560)'); +Koha::Cache::Memory::Lite->get_instance()->clear_from_cache('getlanguage'); $return_undef = 1; is(C4::Languages::getlanguage($query), 'en', 'default to English if no database'); -- 2.39.5