Bugzilla – Attachment 49447 Details for
Bug 16134
t::lib::Mocks::mock_preference should be case-insensitive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16134: t::lib::Mocks::mock_preference should be case-insensitive
Bug-16134-tlibMocksmockpreference-should-be-case-i.patch (text/plain), 1.14 KB, created by
Jonathan Druart
on 2016-03-23 15:29:33 UTC
(
hide
)
Description:
Bug 16134: t::lib::Mocks::mock_preference should be case-insensitive
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-03-23 15:29:33 UTC
Size:
1.14 KB
patch
obsolete
>From 5b058cd6baa8f0257349167dae97ea232a2ddbf7 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 23 Mar 2016 14:07:09 +0100 >Subject: [PATCH] Bug 16134: t::lib::Mocks::mock_preference should be > case-insensitive > >Test plan: >1. prove t/db_dependent/Auth_with_cas.t => FAIL >2. Apply patch >3. prove t/db_dependent/Auth_with_cas.t => SUCCESS > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/lib/Mocks.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/t/lib/Mocks.pm b/t/lib/Mocks.pm >index 22ac659..46a87cb 100644 >--- a/t/lib/Mocks.pm >+++ b/t/lib/Mocks.pm >@@ -24,11 +24,14 @@ sub mock_config { > > my %preferences; > sub mock_preference { >- my $context = new Test::MockModule('C4::Context'); > my ( $pref, $value ) = @_; >- $preferences{$pref} = $value; >+ >+ $preferences{lc($pref)} = $value; >+ >+ my $context = new Test::MockModule('C4::Context'); > $context->mock('preference', sub { > my ( $self, $pref ) = @_; >+ $pref = lc($pref); > if ( exists $preferences{$pref} ) { > return $preferences{$pref} > } else { >-- >2.7.0
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 16134
:
49438
|
49447
|
49466