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

(-)a/t/db_dependent/Koha/XSLT/Base.t (-5 / +4 lines)
Lines 84-90 is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on non-xm Link Here
84
84
85
# Malformed XML tests
85
# Malformed XML tests
86
warning_like { $output = $engine->transform({ xml => '<a></b>', code => $xsl_1 }) }
86
warning_like { $output = $engine->transform({ xml => '<a></b>', code => $xsl_1 }) }
87
    qr{parser error : Opening and ending tag mismatch: a line 1 and b},
87
    qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
88
    "Malformed XML warning correctly displayed";
88
    "Malformed XML warning correctly displayed";
89
is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on malformed xml' );
89
is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on malformed xml' );
90
90
Lines 96-113 my $secondengine=Koha::XSLT::Base->new( { Link Here
96
});
96
});
97
$engine->do_not_return_source(1);
97
$engine->do_not_return_source(1);
98
warning_like { $output = $engine->transform({ xml => '<a></b>', code => $xsl_1 }) }
98
warning_like { $output = $engine->transform({ xml => '<a></b>', code => $xsl_1 }) }
99
    qr{parser error : Opening and ending tag mismatch: a line 1 and b},
99
    qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
100
    "Malformed XML warning correctly displayed";
100
    "Malformed XML warning correctly displayed";
101
is( defined $output? 1: 0, 0, 'Engine respects do_not_return_source==1');
101
is( defined $output? 1: 0, 0, 'Engine respects do_not_return_source==1');
102
$secondengine->print_warns(1);
102
$secondengine->print_warns(1);
103
warning_like { $output = $secondengine->transform({ xml => '<a></b>', code => $xsl_1 }) }
103
warning_like { $output = $secondengine->transform({ xml => '<a></b>', code => $xsl_1 }) }
104
    qr{parser error : Opening and ending tag mismatch: a line 1 and b},
104
    qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
105
    "Malformed XML warning correctly displayed";
105
    "Malformed XML warning correctly displayed";
106
is( defined $output? 1: 0, 0, 'Second engine respects it too');
106
is( defined $output? 1: 0, 0, 'Second engine respects it too');
107
undef $secondengine; #bye
107
undef $secondengine; #bye
108
$engine->do_not_return_source(0);
108
$engine->do_not_return_source(0);
109
warning_like { $output = $engine->transform({ xml => '<a></b>', code => $xsl_1 }) }
109
warning_like { $output = $engine->transform({ xml => '<a></b>', code => $xsl_1 }) }
110
    qr{parser error : Opening and ending tag mismatch: a line 1 and b},
110
    qr{parser error : Opening and ending tag mismatch: a line (0|1) and b},
111
    "Malformed XML warning correctly displayed";
111
    "Malformed XML warning correctly displayed";
112
is( defined $output? 1: 0, 1, 'Engine respects do_not_return_source==0');
112
is( defined $output? 1: 0, 1, 'Engine respects do_not_return_source==0');
113
113
114
- 

Return to bug 25641