View | Details | Raw Unified | Return to bug 24756
Collapse All | Expand All

(-)a/t/db_dependent/Koha/XSLT/Security.t (-3 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Data::Dumper qw/Dumper/;
22
use File::Temp qw/tempfile/;
21
use File::Temp qw/tempfile/;
23
use Test::More tests => 8;
22
use Test::More tests => 8;
24
use Test::Warn;
23
use Test::Warn;
Lines 118-124 $engine->print_warns(1); Link Here
118
    my @warn;
117
    my @warn;
119
    local $SIG{__WARN__} = sub { push @warn, $_[0]; };
118
    local $SIG{__WARN__} = sub { push @warn, $_[0]; };
120
    $output= $engine->transform({ xml => "<ignored/>", code => $xslt });
119
    $output= $engine->transform({ xml => "<ignored/>", code => $xslt });
121
    is( ( grep { /failed to load external/ } @warn ), 1, 'Expected import error. Additional info: '.Dumper(@warn) );
120
    is( ( grep { /failed to load (external entity|HTTP resource)/ } @warn ), 1, 'Expected import error' ); # we saw both messages on Jenkins passing by
122
    is( ( grep { /read_net/ } @warn ), 0, 'No read_net warn for remote import' );
121
    is( ( grep { /read_net/ } @warn ), 0, 'No read_net warn for remote import' );
123
}
122
}
124
123
125
- 

Return to bug 24756