Bugzilla – Attachment 183993 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.10 KB, created by
Jonathan Druart
on 2025-07-11 13:02:41 UTC
(
hide
)
Description:
Bug 40353: Remove warnings from Koha/Patron.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-11 13:02:41 UTC
Size:
1.10 KB
patch
obsolete
>From ec204c44b61d88514b8b8b5be0b88961ca1dfd57 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 >--- > 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.34.1
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