From 8e413d6241fe904e8f701cccfe15fc838082fa70 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 15 May 2023 06:58:45 +0000 Subject: [PATCH] Bug 33733: Remove need for Test::DBIx::Class Test plan: Run t/XSLT.t Signed-off-by: Marcel de Rooy Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- t/XSLT.t | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/t/XSLT.t b/t/XSLT.t index e3a733251ce..ee1c01e9e91 100755 --- a/t/XSLT.t +++ b/t/XSLT.t @@ -16,33 +16,22 @@ # along with Koha; if not, see . use Modern::Perl; -use Test::More; +use Test::More tests => 1; use File::Temp; use File::Path qw/make_path/; use t::lib::Mocks; -use Module::Load::Conditional qw/check_install/; - -BEGIN { - if ( check_install( module => 'Test::DBIx::Class' ) ) { - plan tests => 9; - } else { - plan skip_all => "Need Test::DBIx::Class" - } - - use_ok('C4::XSLT'); -}; - -use Test::DBIx::Class; -my $db = Test::MockModule->new('Koha::Database'); -$db->mock( _new_schema => sub { return Schema(); } ); +use C4::XSLT; my $dir = File::Temp->newdir(); my @themes = ('prog', 'test'); my @langs = ('en', 'es-ES'); +subtest 'Tests moved from t' => sub { + plan tests => 8; + # create temporary files to be tested later foreach my $theme (@themes) { foreach my $lang (@langs) { @@ -76,4 +65,4 @@ is(find_and_slurp($dir, 'nope', 'fr-FR'), 'Theme prog, language en', 'Fell ba my $matching_string = q{0}; my $sysprefs_xml = C4::XSLT::get_xslt_sysprefs(); ok( $sysprefs_xml =~ m/$matching_string/, 'singleBranchMode has a value of 0'); - +}; -- 2.25.1