Lines 22-27
use utf8;
Link Here
|
22 |
use YAML; |
22 |
use YAML; |
23 |
|
23 |
|
24 |
use C4::Debug; |
24 |
use C4::Debug; |
|
|
25 |
use C4::XSLT; |
25 |
require C4::Context; |
26 |
require C4::Context; |
26 |
|
27 |
|
27 |
# work around spurious wide character warnings |
28 |
# work around spurious wide character warnings |
Lines 99-104
our $QueryFuzzy = 0;
Link Here
|
99 |
our $UseQueryParser = 0; |
100 |
our $UseQueryParser = 0; |
100 |
our $SearchEngine = 'Zebra'; |
101 |
our $SearchEngine = 'Zebra'; |
101 |
our $marcflavour = 'MARC21'; |
102 |
our $marcflavour = 'MARC21'; |
|
|
103 |
our $htdocs = File::Spec->rel2abs(dirname($0)); |
104 |
my @htdocs = split /\//, $htdocs; |
105 |
$htdocs[-2] = 'koha-tmpl'; |
106 |
$htdocs[-1] = 'opac-tmpl'; |
107 |
$htdocs = join '/', @htdocs; |
102 |
our $contextmodule = new Test::MockModule('C4::Context'); |
108 |
our $contextmodule = new Test::MockModule('C4::Context'); |
103 |
$contextmodule->mock('preference', sub { |
109 |
$contextmodule->mock('preference', sub { |
104 |
my ($self, $pref) = @_; |
110 |
my ($self, $pref) = @_; |
Lines 140-145
$contextmodule->mock('preference', sub {
Link Here
|
140 |
return ''; |
146 |
return ''; |
141 |
} elsif ($pref eq 'template') { |
147 |
} elsif ($pref eq 'template') { |
142 |
return ''; |
148 |
return ''; |
|
|
149 |
} elsif ($pref eq 'OPACXSLTResultsDisplay') { |
150 |
return C4::XSLT::_get_best_default_xslt_filename($htdocs, 'bootstrap','en',$marcflavour . 'slim2OPACResults.xsl'); |
151 |
} elsif ($pref eq 'BiblioDefaultView') { |
152 |
return 'normal'; |
153 |
} elsif ($pref eq 'IdRef') { |
154 |
return '0'; |
155 |
} elsif ($pref eq 'IntranetBiblioDefaultView') { |
156 |
return 'normal'; |
157 |
} elsif ($pref eq 'OPACBaseURL') { |
158 |
return 'http://library.mydnsname.org'; |
159 |
} elsif ($pref eq 'OPACResultsLibrary') { |
160 |
return 'homebranch'; |
161 |
} elsif ($pref eq 'OpacSuppression') { |
162 |
return '0'; |
163 |
} elsif ($pref eq 'OPACURLOpenInNewWindow') { |
164 |
return '0'; |
165 |
} elsif ($pref eq 'TraceCompleteSubfields') { |
166 |
return '0'; |
167 |
} elsif ($pref eq 'TraceSubjectSubdivisions') { |
168 |
return '0'; |
169 |
} elsif ($pref eq 'TrackClicks') { |
170 |
return '0'; |
171 |
} elsif ($pref eq 'URLLinkText') { |
172 |
return q{}; |
173 |
} elsif ($pref eq 'UseAuthoritiesForTracings') { |
174 |
return '1'; |
175 |
} elsif ($pref eq 'UseControlNumber') { |
176 |
return '0'; |
177 |
} elsif ($pref eq 'UseICU') { |
178 |
return '0'; |
179 |
} elsif ($pref eq 'viewISBD') { |
180 |
return '1'; |
143 |
} else { |
181 |
} else { |
144 |
warn "The syspref $pref was requested but I don't know what to say; this indicates that the test requires updating" |
182 |
warn "The syspref $pref was requested but I don't know what to say; this indicates that the test requires updating" |
145 |
unless $pref =~ m/(XSLT|item|branch|holding|image)/i; |
183 |
unless $pref =~ m/(XSLT|item|branch|holding|image)/i; |
146 |
- |
|
|