Bugzilla – Attachment 47533 Details for
Bug 15719
Silence warning in C4/Language.pm during web install
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15719: Silence warning in C4/Language.pm during web install
Bug-15719-Silence-warning-in-C4Languagepm-during-w.patch (text/plain), 1.69 KB, created by
Mark Tompsett
on 2016-02-01 23:41:30 UTC
(
hide
)
Description:
Bug 15719: Silence warning in C4/Language.pm during web install
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-02-01 23:41:30 UTC
Size:
1.69 KB
patch
obsolete
>From a176763b9b202412f5c480d0a4095e2bbebafd8a Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 1 Feb 2016 18:26:41 -0500 >Subject: [PATCH] Bug 15719: Silence warning in C4/Language.pm during web > install > >Test empty database case. > >TEST PLAN >--------- >1) prove -v t/Languages.t > -- success (because test case is missing) >2) Apply this patch >3) prove -v t/Languages.t > -- success, but warning printed. >4) run koha qa test tools >--- > t/Languages.t | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/t/Languages.t b/t/Languages.t >index 6b0f638..8fee200 100644 >--- a/t/Languages.t >+++ b/t/Languages.t >@@ -18,7 +18,7 @@ > # with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 3; >+use Test::More tests => 4; > use Test::MockModule; > use CGI qw ( -utf8 ); > >@@ -28,13 +28,16 @@ BEGIN { > > my @languages = (); # stores the list of active languages > # for the syspref mock >+my $return_undef = 0; > > my $module_context = new Test::MockModule('C4::Context'); > > $module_context->mock( > preference => sub { > my ($self, $pref) = @_; >- if ($pref =~ /language/) { >+ if ($return_undef) { >+ return undef; >+ } elsif ($pref =~ /language/) { > return join ',', @languages; > } else { > return 'XXX'; >@@ -50,3 +53,6 @@ is(C4::Languages::getlanguage($query), 'de-DE', 'default to first language speci > > @languages = (); > is(C4::Languages::getlanguage($query), 'en', 'default to English if no language specified in syspref (bug 10560)'); >+ >+$return_undef = 1; >+is(C4::Languages::getlanguage($query), 'en', 'default to English if no database'); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15719
:
47533
|
47534
|
47744
|
47745
|
47806
|
47807