Bug 8995: (QA follow-up) Mock required sysprefs in the tests
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 30 Apr 2019 14:37:47 +0000 (11:37 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 30 Apr 2019 14:44:44 +0000 (14:44 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

C4/XSLT.pm
t/db_dependent/Search.t

index da9d350..9650689 100644 (file)
@@ -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 = ();
index 4ef1ebe..60da42f 100644 (file)
@@ -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;