From 9365d61b3c82ed0a63b18f7f450d0226a8a71f2c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 21 Aug 2020 10:06:57 +0200 Subject: [PATCH] Bug 26031: Add diagnostic to search_utf8.t Signed-off-by: Jonathan Druart --- t/db_dependent/www/search_utf8.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/www/search_utf8.t b/t/db_dependent/www/search_utf8.t index 859b0114a9..25f7d9d60e 100644 --- a/t/db_dependent/www/search_utf8.t +++ b/t/db_dependent/www/search_utf8.t @@ -256,7 +256,14 @@ sub test_search{ $agent->field('q', $search_key); $agent->click(); my $intra_text = $agent->text() ; - like( $intra_text, qr|Publisher: $publisher|, ); + my $diag = sub { + my $pref = 'XSLTResultsDisplay'; + my $xslt_file = C4::Context->preference('marcflavour') . 'slim2intranetResults.xsl'; + my $xslt_filepath = C4::XSLT::_get_best_default_xslt_filename( C4::Context->config('intrahtdocs'), C4::Context->preference("template"), 'en', $xslt_file ); + return sprintf( "===DIAG===\n%s is %s\n%s %s\n==========", $pref, C4::Context->preference($pref), $xslt_filepath, ( -f $xslt_filepath ? 'exists' : 'does not exist' )); + }; + + like( $intra_text, qr|Publisher: $publisher|, ) or diag($diag->()); $agent->get_ok( "$intranet/cgi-bin/koha/catalogue/search.pl" , "got search on intranet"); $agent->form_number(5); -- 2.39.5