Bug 21817: Centralize the mock of userenv from tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Nov 2018 21:21:58 +0000 (18:21 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 2 Jan 2019 20:18:29 +0000 (20:18 +0000)
commitca124b5c14a3f0a34fafe307fec9ade4008eaa41
tree23624dffb6a07ca70145c3e98b669b059004e526
parent3f734900f0a86e5478afc22cb77b493500e998e9
Bug 21817: Centralize the mock of userenv from tests

This patch adds a new method mock_userenv from t::lib::Mocks in order to
simplify the mock of the userenv.

Test plan:
prove all the test files modified by this patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
37 files changed:
t/Budgets/CanUserModifyBudget.t
t/Budgets/CanUserUseBudget.t
t/Circulation_barcodedecode.t
t/db_dependent/Acquisition/NewOrder.t
t/db_dependent/ArticleRequests.t
t/db_dependent/Bookseller.t
t/db_dependent/Budgets.t
t/db_dependent/Circulation.t
t/db_dependent/Circulation/IsItemIssued.t
t/db_dependent/Circulation/IssuingRules/maxsuspensiondays.t
t/db_dependent/Circulation/MarkIssueReturned.t
t/db_dependent/Circulation/SwitchOnSiteCheckouts.t
t/db_dependent/Circulation/TooMany.t
t/db_dependent/Circulation/issue.t
t/db_dependent/DecreaseLoanHighHolds.t
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
t/db_dependent/Holds/RevertWaitingStatus.t
t/db_dependent/Koha/Items.t
t/db_dependent/Koha/Object.t
t/db_dependent/Koha/Patron/Modifications.t
t/db_dependent/Koha/Patrons.t
t/db_dependent/Koha/Reviews.t
t/db_dependent/Labels/t_Label.t
t/db_dependent/Letters.t
t/db_dependent/Letters/TemplateToolkit.t
t/db_dependent/MarcModificationTemplates.t
t/db_dependent/Members.t
t/db_dependent/Members/Attributes.t
t/db_dependent/Patron/Borrower_Discharge.t
t/db_dependent/Patron/Borrower_PrevCheckout.t
t/db_dependent/PatronLists.t
t/db_dependent/Reserves.t
t/db_dependent/Template/Plugin/Branches.t
t/db_dependent/Utils/Datatables_Members.t
t/db_dependent/Utils/Datatables_Virtualshelves.t
t/db_dependent/rollingloans.t
t/lib/Mocks.pm