Bug 40353 - Koha/Patron.t generates warnings
Summary: Koha/Patron.t generates warnings
Status: Pushed to oldstable
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: 40401
  Show dependency treegraph
 
Reported: 2025-07-11 13:01 UTC by Jonathan Druart
Modified: 2025-08-01 09:22 UTC (History)
2 users (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,25.05.02,24.11.08
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
Comment 4 Paul Derscheid 2025-07-24 08:20:55 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 5 Fridolin Somers 2025-08-01 09:22:59 UTC
Pushed to 24.11.x for 24.11.08