From abffac39c24181d4bddf315282db3b66c8195444 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 2 Mar 2020 11:08:18 +0000 Subject: [PATCH] Bug 24756: Catch two failed to load-variations in Security.t Content-Type: text/plain; charset=utf-8 Test 7 in Security.t failed when 'failed to load HTTP resource' was returned by libxml2 instead of 'failed to load external entity'. We now remove the debugging with Dumper again and adjust the regex to include both variations. Signed-off-by: Marcel de Rooy --- t/db_dependent/Koha/XSLT/Security.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/t/db_dependent/Koha/XSLT/Security.t b/t/db_dependent/Koha/XSLT/Security.t index 7d0d9f29ad..50a47c31ce 100644 --- a/t/db_dependent/Koha/XSLT/Security.t +++ b/t/db_dependent/Koha/XSLT/Security.t @@ -18,7 +18,6 @@ # along with Koha; if not, see . use Modern::Perl; -use Data::Dumper qw/Dumper/; use File::Temp qw/tempfile/; use Test::More tests => 8; use Test::Warn; @@ -118,7 +117,7 @@ $engine->print_warns(1); my @warn; local $SIG{__WARN__} = sub { push @warn, $_[0]; }; $output= $engine->transform({ xml => "", code => $xslt }); - is( ( grep { /failed to load external/ } @warn ), 1, 'Expected import error. Additional info: '.Dumper(@warn) ); + is( ( grep { /failed to load (external entity|HTTP resource)/ } @warn ), 1, 'Expected import error' ); # we saw both messages on Jenkins passing by is( ( grep { /read_net/ } @warn ), 0, 'No read_net warn for remote import' ); } -- 2.11.0