diff --git a/t/db_dependent/Koha/XSLT/Base.t b/t/db_dependent/Koha/XSLT/Base.t
index 55f490c6e8..a13f109554 100644
--- a/t/db_dependent/Koha/XSLT/Base.t
+++ b/t/db_dependent/Koha/XSLT/Base.t
@@ -84,7 +84,7 @@ is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on non-xm
# Malformed XML tests
warning_like { $output = $engine->transform({ xml => '', code => $xsl_1 }) }
- qr{parser error : Opening and ending tag mismatch: a line 1 and b},
+ qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
"Malformed XML warning correctly displayed";
is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on malformed xml' );
@@ -96,18 +96,18 @@ my $secondengine=Koha::XSLT::Base->new( {
});
$engine->do_not_return_source(1);
warning_like { $output = $engine->transform({ xml => '', code => $xsl_1 }) }
- qr{parser error : Opening and ending tag mismatch: a line 1 and b},
+ qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
"Malformed XML warning correctly displayed";
is( defined $output? 1: 0, 0, 'Engine respects do_not_return_source==1');
$secondengine->print_warns(1);
warning_like { $output = $secondengine->transform({ xml => '', code => $xsl_1 }) }
- qr{parser error : Opening and ending tag mismatch: a line 1 and b},
+ qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
"Malformed XML warning correctly displayed";
is( defined $output? 1: 0, 0, 'Second engine respects it too');
undef $secondengine; #bye
$engine->do_not_return_source(0);
warning_like { $output = $engine->transform({ xml => '', code => $xsl_1 }) }
- qr{parser error : Opening and ending tag mismatch: a line 1 and b},
+ qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
"Malformed XML warning correctly displayed";
is( defined $output? 1: 0, 1, 'Engine respects do_not_return_source==0');