Bugzilla – Attachment 95823 Details for
Bug 23274
t/db_dependent/XISBN.t fails with Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23274: Mock simple_search_compat to cover both search engines
Bug-23274-Mock-simplesearchcompat-to-cover-both-se.patch (text/plain), 1.26 KB, created by
Nick Clemens (kidclamp)
on 2019-11-26 12:57:39 UTC
(
hide
)
Description:
Bug 23274: Mock simple_search_compat to cover both search engines
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-11-26 12:57:39 UTC
Size:
1.26 KB
patch
obsolete
>From 59ccffa05ef3f804257300b7ab7bcf50060e5c25 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 26 Nov 2019 12:57:17 +0000 >Subject: [PATCH] Bug 23274: Mock simple_search_compat to cover both search > engines > >--- > t/db_dependent/XISBN.t | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/XISBN.t b/t/db_dependent/XISBN.t >index 5ca2b7a538..d83419fb70 100755 >--- a/t/db_dependent/XISBN.t >+++ b/t/db_dependent/XISBN.t >@@ -22,9 +22,11 @@ BEGIN { > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > >-my $search_module = new Test::MockModule('C4::Search'); >+my $engine = C4::Context->preference("SearchEngine") // 'Zebra'; >+my $search_module = new Test::MockModule("Koha::SearchEngine::${engine}::Search"); >+ >+$search_module->mock('simple_search_compat', \&Mock_simple_search_compat ); > >-$search_module->mock('SimpleSearch', \&Mock_SimpleSearch ); > my $errors; > my $context = C4::Context->new; > >@@ -95,8 +97,9 @@ sub _add_biblio_with_isbn { > > # Mocked subs > >-# C4::Search::SimpleSearch >-sub Mock_SimpleSearch { >+# Koha::SearchEngine::${SearchEngine}::Search::simple_search_compat >+sub Mock_simple_search_compat { >+ my $self = shift; > my $query = shift; > my @results; > >-- >2.11.0
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 23274
:
95823
|
97144
|
97168