Bug 16452: Remove the warnings raised by PatronLists.t
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 5 May 2016 14:36:50 +0000 (15:36 +0100)
committerBrendan Gallagher <bredan@bywatersolutions.com>
Thu, 5 May 2016 20:44:47 +0000 (20:44 +0000)
We need to define a userenv to get rid of the warnings

Test plan:
  prove t/db_dependent/PatronLists.t
should not return any warnings

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
t/db_dependent/PatronLists.t

index 54a153a..7b8fcf2 100755 (executable)
@@ -9,6 +9,9 @@ BEGIN {
     use_ok('Koha::List::Patron');
 }
 
+C4::Context->_new_userenv('DUMMY SESSION');
+C4::Context->set_userenv(0,0,0,'firstname','surname', 'BRANCH1', 'Library 1', 0, ', ');
+
 my $dbh = C4::Context->dbh;
 my $sth = $dbh->prepare("SELECT * FROM borrowers ORDER BY RAND() LIMIT 10");
 $sth->execute();