Bug 13284: t/RotatingCollections.t shouldn't depend on the DB
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 19 Nov 2014 21:04:31 +0000 (18:04 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 20 Nov 2014 12:37:20 +0000 (09:37 -0300)
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/RotatingCollections.t

index 10a4e20..618703e 100755 (executable)
@@ -1,14 +1,29 @@
 #!/usr/bin/perl
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# This Koha test module is a stub!  
-# Add more tests here!!!
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 use Test::More tests => 1;
+use t::lib::Mocks;
 
 BEGIN {
-        use_ok('C4::RotatingCollections');
+    # Mock the DB connexion and C4::Context
+    my $context = t::lib::Mocks::mock_dbh;
+    use_ok('C4::RotatingCollections');
 }
 
+1;