$indexer =
new ProductAdminSearchIndexer( $this->
createMock(Connection::
class),
$this->
createMock(IteratorFactory::
class),
$this->
createMock(EntityRepository::
class),
100,
);
$this->registry->
method('getIndexers'
)->
willReturn(['product' =>
$indexer]);
$this->registry->
method('getIndexer'
)->
willReturn($indexer);
$searchHelper =
new AdminElasticsearchHelper(true, false, 'sw-admin'
);
$this->searcher =
new AdminSearcher($this->client,
$this->registry,
$searchHelper, '5s', 20
);
} public function testElasticSearch(): void
{ $this->client
->
expects(static::
once()) ->
method('msearch'
) ->
with([ 'body' =>
[ [ 'index' => 'sw-admin-product-listing',
],