Bugzilla – Attachment 184029 Details for
Bug 40353
Koha/Patron.t generates warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40353: Remove warnings from Koha/Patron.t
Bug-40353-Remove-warnings-from-KohaPatront.patch (text/plain), 1.17 KB, created by
Martin Renvoize (ashimema)
on 2025-07-12 10:15:34 UTC
(
hide
)
Description:
Bug 40353: Remove warnings from Koha/Patron.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-07-12 10:15:34 UTC
Size:
1.17 KB
patch
obsolete
>From 23c1e14d40338a62180f6d41c1ed9ed875851fd3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 11 Jul 2025 15:01:57 +0200 >Subject: [PATCH] Bug 40353: Remove warnings from Koha/Patron.t > >C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152. >C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152. >C4::Context->userenv not defined! at /kohadevbox/koha/Koha/Patron.pm line 2152. > >We need to mock the userenv > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > t/db_dependent/Koha/Patron.t | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t >index be991cb43a7..4f824aa782f 100755 >--- a/t/db_dependent/Koha/Patron.t >+++ b/t/db_dependent/Koha/Patron.t >@@ -739,6 +739,8 @@ subtest 'to_api() tests' => sub { > } > ); > >+ t::lib::Mocks::mock_userenv( { patron => $consumer } ); >+ > my $restricted = $patron->to_api( { user => $consumer } )->{restricted}; > ok( defined $restricted, 'restricted is defined' ); > ok( !$restricted, 'debarred is undef, restricted evaluates to false' ); >-- >2.50.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 40353
:
183993
| 184029