Bug 24673 (18.11.x U18 follow-up): Fixing t/db_dependent/Koha/XSLT/Security.t
authorHayley Mapley <hayleymapley@catalyst.net.nz>
Tue, 14 Apr 2020 04:00:40 +0000 (16:00 +1200)
committerHayley Mapley <hayleymapley@catalyst.net.nz>
Tue, 14 Apr 2020 04:00:40 +0000 (16:00 +1200)
The test t/db_dependent/Koha/XSLT/Security.t failed on Jenkins for U18
when this bug's patches were backported, due to it returning a different
IO error message for XSLT.

This patch adds a condition to the regex which matches both messages:
'Failed to load external entity' and 'Failed to load HTTP resource'

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>

t/db_dependent/Koha/XSLT/Security.t

index 249d549..ebc9e78 100644 (file)
@@ -121,7 +121,7 @@ EOT
 $xslt_file = mytempfile($xslt);
 $engine->print_warns(1);
 warning_like { $output= $engine->transform( "<ignored/>", $xslt_file ); }
-    qr/I\/O warning : failed to load external entity/,
+    qr/I\/O warning : failed to load (external entity|HTTP resource)/,
     'Remote import does not fail on read_net';
 
 sub mytempfile {