We need some changes for 28959 changing category to public.
Added the userenv mocking.
Note: A follow-up does a bit more refactoring here. But they
should pass at least now.
Test plan:
Run t/db_dependent/Virtualshelves.t
Run t/db_dependent/Koha/Patrons.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>