Bug 24735: Remove more code from tests

That was use by QP tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-02-26 15:59:02 +01:00 committed by Martin Renvoize
parent 52e95fff34
commit 6321c7220e
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -656,29 +656,6 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
"Warning is raised correctly for invalid tags in MARC::Record";
is(scalar(@newresults), 0, 'a record that cannot be parsed by MARC::Record is simply skipped (bug 10684)');
# Testing exploding indexes
my $term;
my $searchmodule = new Test::MockModule('C4::Search');
$searchmodule->mock('SimpleSearch', sub {
my $query = shift;
is($query, "he:$term", "Searching for expected term '$term' for exploding") or return '', [], 0;
my $record = MARC::Record->new;
if ($query =~ m/Arizona/) {
$record->add_fields(
[ '001', '1234' ],
[ '151', ' ', ' ', a => 'Arizona' ],
[ '551', ' ', ' ', a => 'United States', w => 'g' ],
[ '551', ' ', ' ', a => 'Maricopa County', w => 'h' ],
[ '551', ' ', ' ', a => 'Navajo County', w => 'h' ],
[ '551', ' ', ' ', a => 'Pima County', w => 'h' ],
[ '551', ' ', ' ', a => 'New Mexico' ],
);
}
return '', [ $record->as_usmarc() ], 1;
});
my ($auths, $count) = SearchAuthorities(
['mainentry'], ['and'], [''], ['starts'],
['shakespeare'], 0, 10, '', '', 1