Bug 40353 - Koha/Patron.t generates warnings
Summary: Koha/Patron.t generates warnings
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks: 25515 40401
  Show dependency treegraph
 
Reported: 2025-07-11 13:01 UTC by Jonathan Druart
Modified: 2025-07-16 07:47 UTC (History)
1 user (show)

See Also:
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:


Attachments
Bug 40353: Remove warnings from Koha/Patron.t (1.10 KB, patch)
2025-07-11 13:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40353: Remove warnings from Koha/Patron.t (1.17 KB, patch)
2025-07-12 10:15 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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