Bugzilla – Attachment 105161 Details for
Bug 25416
Add information about anonymous session for XSLT use
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[19.11.x] Bug 25416: Unit tests
1911x-Bug-25416-Unit-tests.patch (text/plain), 1.73 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-05-20 18:54:55 UTC
(
hide
)
Description:
[19.11.x] Bug 25416: Unit tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-05-20 18:54:55 UTC
Size:
1.73 KB
patch
obsolete
>From b7546c3499b8bf122b2c0f828fd8008d8958b677 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 11 May 2020 08:38:49 -0300 >Subject: [PATCH] [19.11.x] Bug 25416: Unit tests > >This patch adds tests for the new 'feature': i.e. searchResults passes >the added $xslt_variables to the XSLTParse4Display method. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Search.t | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t >index 60da046249d..deaed107916 100644 >--- a/t/db_dependent/Search.t >+++ b/t/db_dependent/Search.t >@@ -513,6 +513,16 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' > } > is ($allavailable, 'true', 'All records have at least one item available'); > >+ my $mocked_xslt = Test::MockModule->new('Koha::XSLT_Handler'); >+ $mocked_xslt->mock( 'transform', sub { >+ my ($self, $xml) = @_; >+ return $xml; >+ }); >+ >+ @newresults = searchResults({'interface'=>'opac'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, >+ $results_hashref->{'biblioserver'}->{"RECORDS"}, { anonymous_session => 1 }); >+ >+ like( $newresults[0]->{XSLTResultsRecord}, qr/<variable name="anonymous_session">1<\/variable>/, "Variable injected correctly" ); > > ( $error, $query, $simple_query, $query_cgi, > $query_desc, $limit, $limit_cgi, $limit_desc, >@@ -971,7 +981,7 @@ sub run_unimarc_search_tests { > } > > subtest 'MARC21 + DOM' => sub { >- plan tests => 112; >+ plan tests => 113; > run_marc21_search_tests(); > }; > >-- >2.26.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25416
:
104533
|
104534
|
104689
|
104694
|
104695
|
104718
|
104719
|
104720
|
104764
|
104767
|
104768
|
104769
|
104770
|
105160
| 105161