Bug 22368: Make sure the tests will always pass
[koha.git] / t / XSLT.t
index 7136375..e3a7332 100755 (executable)
--- a/t/XSLT.t
+++ b/t/XSLT.t
@@ -27,7 +27,7 @@ use Module::Load::Conditional qw/check_install/;
 
 BEGIN {
     if ( check_install( module => 'Test::DBIx::Class' ) ) {
-        plan tests => 10;
+        plan tests => 9;
     } else {
         plan skip_all => "Need Test::DBIx::Class"
     }
@@ -35,18 +35,9 @@ BEGIN {
     use_ok('C4::XSLT');
 };
 
-use Test::DBIx::Class {
-    schema_class => 'Koha::Schema',
-    connect_info => ['dbi:SQLite:dbname=:memory:','',''],
-    connect_opts => { name_sep => '.', quote_char => '`', },
-    fixture_class => '::Populate',
-}, 'Branch' ;
-
-fixtures_ok [
-    Branch => [
-    ],
-];
-
+use Test::DBIx::Class;
+my $db = Test::MockModule->new('Koha::Database');
+$db->mock( _new_schema => sub { return Schema(); } );
 
 my $dir = File::Temp->newdir();
 my @themes = ('prog', 'test');
@@ -86,4 +77,3 @@ my $matching_string = q{<syspref name="singleBranchMode">0</syspref>};
 my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs();
 ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 0');
 
-1;