From 76871516050103f986e50034bccadd4b82fcd2d7 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 30 Apr 2019 11:37:47 -0300 Subject: [PATCH] Bug 8995: (QA follow-up) Mock required sysprefs in the tests Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens --- C4/XSLT.pm | 2 +- t/db_dependent/Search.t | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index da9d350532..9650689c31 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -252,7 +252,7 @@ sub XSLTParse4Display { if (C4::Context->preference('item-level_itypes')) { @biblio_itemtypes = $biblio->items->get_column("itype"); } else { - push @biblio_itemtypes, $biblio->biblioitem->itemtype; + push @biblio_itemtypes, $biblio->itemtype; } my @itypes = split( /\s/, C4::Context->preference('OPACOpenURLItemTypes') ); my %original = (); diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 4ef1ebe4d6..60da42ff55 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -180,6 +180,12 @@ $contextmodule->mock('preference', sub { return '1'; } elsif ($pref eq 'EasyAnalyticalRecords') { return '0'; + } elsif ($pref eq 'OpenURLResolverURL') { + return '0'; + } elsif ($pref eq 'OPACShowOpenURL') { + return '0'; + } elsif ($pref eq 'OpenURLText') { + return '0'; } else { warn "The syspref $pref was requested but I don't know what to say; this indicates that the test requires updating" unless $pref =~ m/(XSLT|item|branch|holding|image)/i; -- 2.39.5