Lines 1-23
Link Here
|
1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
2 |
use Test::More; |
2 |
use Test::More; |
3 |
use Koha::SearchEngine::Solr; |
3 |
use Koha::SearchEngine::Solr; |
4 |
use Koha::SearchEngine::Zebra; |
4 |
#use Koha::SearchEngine::Zebra; |
5 |
use Koha::SearchEngine::Search; |
5 |
use Koha::SearchEngine::Search; |
6 |
use t::lib::Mocks; |
6 |
use t::lib::Mocks qw( mock_preference ); |
7 |
|
7 |
|
8 |
my $se_index = Koha::SearchEngine::Solr->new; |
8 |
my $se_index = Koha::SearchEngine::Solr->new; |
9 |
ok($se_index->isa('Data::SearchEngine::Solr'), 'Solr is a Solr data searchengine'); |
9 |
ok($se_index->isa('Data::SearchEngine::Solr'), 'Solr is a Solr data searchengine'); |
10 |
|
10 |
|
11 |
$se_index = Koha::SearchEngine::Zebra->new; |
11 |
#$se_index = Koha::SearchEngine::Zebra->new; |
12 |
ok($se_index->isa('Data::SearchEngine::Zebra'), 'Zebra search engine'); |
12 |
#ok($se_index->isa('Data::SearchEngine::Zebra'), 'Zebra search engine'); |
13 |
|
13 |
|
14 |
set_solr(); |
14 |
t::lib::Mocks::mock_preference('SearchEngine', 'Solr'); |
15 |
$se_index = Koha::SearchEngine::Search->new; |
15 |
$se_index = Koha::SearchEngine::Search->new; |
16 |
ok($se_index->searchengine->isa('Data::SearchEngine::Solr'), 'Solr search engine'); |
16 |
ok($se_index->searchengine->isa('Data::SearchEngine::Solr'), 'Solr search engine'); |
17 |
|
17 |
|
18 |
set_zebra(); |
18 |
#t::lib::Mocks::mock_preference('SearchEngine', 'Zebra'); |
19 |
$se_index = Koha::SearchEngine::Search->new; |
19 |
#$se_index = Koha::SearchEngine::Search->new; |
20 |
ok($se_index->searchengine->isa('Data::SearchEngine::Zebra'), 'Zebra search engine'); |
20 |
#ok($se_index->searchengine->isa('Data::SearchEngine::Zebra'), 'Zebra search engine'); |
21 |
|
21 |
|
22 |
|
22 |
|
23 |
done_testing; |
23 |
done_testing; |