The Letters test mocks userenv, but fails to provide flags, which causes the C4::Context IsSuperLibrarian to generate noise. Add a pretty flag value.
prove -v t/db_dependent/Letters.t ... ok 31 - GetLetters gets the name correctly # Subtest: getletter 1..16 ok 1 - GetLetters gets the branch code correctly ok 2 - GetLetters gets the module correctly ok 3 - GetLetters gets the code correctly ok 4 - GetLetters gets the name correctly ok 5 - GetLetters gets the boolean is_html correctly ok 6 - GetLetters gets the title correctly ok 7 - GetLetters gets the content correctly ok 8 - GetLetters gets the message type correctly C4::Context->userenv not defined! at /home/mtompset/kohaclone/C4/Letters.pm line 207. ok 9 - GetLetters gets the branch code correctly ok 10 - GetLetters gets the module correctly ok 11 - GetLetters gets the code correctly ok 12 - GetLetters gets the name correctly ok 13 - GetLetters gets the boolean is_html correctly ok 14 - GetLetters gets the title correctly ok 15 - GetLetters gets the content correctly ok 16 - GetLetters gets the message type correctly ...
Created attachment 65510 [details] [review] Bug 19042: Silence warnings t/db_dependent/Letters.t TEST PLAN --------- prove t/db_dependent/Letters.t -- there will be a message: "C4::Context->userenv not defined!" apply this patch prove t/db_dependent/Letters.t -- there will no longer be that message. run qa test tools
Created attachment 65511 [details] [review] Bug 19042: Silence warnings t/db_dependent/Letters.t TEST PLAN --------- prove t/db_dependent/Letters.t -- there will be a message: "C4::Context->userenv not defined!" apply this patch prove t/db_dependent/Letters.t -- there will no longer be that message. run qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Created attachment 65835 [details] [review] Bug 19042: Silence warnings t/db_dependent/Letters.t TEST PLAN --------- prove t/db_dependent/Letters.t -- there will be a message: "C4::Context->userenv not defined!" apply this patch prove t/db_dependent/Letters.t -- there will no longer be that message. run qa test tools Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 65836 [details] [review] Bug 19042: Add mock IndependentBranches=0 for the other test These tests do not cover correctly getletter, but it is not the goal of this patch. Superlibrarian behaviour must be tested as well. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.05.
These patches have been pushed to 16.11.x and will be in 16.11.13.