|
Lines 17-25
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 12; |
20 |
use Module::Load::Conditional qw[can_load check_install requires]; |
|
|
21 |
use Test::More; |
| 21 |
use t::lib::Mocks; |
22 |
use t::lib::Mocks; |
| 22 |
|
23 |
|
|
|
24 |
if ( ! can_load( |
| 25 |
modules => { 'Koha::SearchEngine::Elasticsearch::Indexer' => undef, } ) |
| 26 |
) { |
| 27 |
my $missing_module; |
| 28 |
if ( $Module::Load::Conditional::ERROR =~ /Can\'t locate (.*?) / ) { |
| 29 |
$missing_module = $1; |
| 30 |
} |
| 31 |
my $es_dep_msg = "Required module $missing_module is not installed"; |
| 32 |
plan( skip_all => $es_dep_msg ); |
| 33 |
} |
| 34 |
else { |
| 35 |
plan tests => 12; |
| 36 |
} |
| 37 |
|
| 23 |
use Koha::SearchEngine::Elasticsearch::QueryBuilder; |
38 |
use Koha::SearchEngine::Elasticsearch::QueryBuilder; |
| 24 |
|
39 |
|
| 25 |
my $builder = Koha::SearchEngine::Elasticsearch::QueryBuilder->new( { index => 'mydb' } ); |
40 |
my $builder = Koha::SearchEngine::Elasticsearch::QueryBuilder->new( { index => 'mydb' } ); |
| 26 |
- |
|
|