Bug 40353

Summary: Koha/Patron.t generates warnings
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: minor    
Priority: P5 - low CC: martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 25515, 40401    
Attachments: Bug 40353: Remove warnings from Koha/Patron.t
Bug 40353: Remove warnings from Koha/Patron.t

Description Jonathan Druart 2025-07-11 13:01:36 UTC
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.
Comment 1 Jonathan Druart 2025-07-11 13:02:41 UTC
Created attachment 183993 [details] [review]
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
Comment 2 Martin Renvoize (ashimema) 2025-07-12 10:15:34 UTC
Created attachment 184029 [details] [review]
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>
Comment 3 Lucas Gass (lukeg) 2025-07-15 22:35:18 UTC
Nice work everyone!

Pushed to main for 25.11