private IndicesNamespace&MockObject
$indices;
private MultilingualEsIndexer&MockObject
$newEsIndexer;
protected function setUp(): void
{ Feature::
skipTestIfActive('ES_MULTILINGUAL_INDEX',
$this);
$this->connection =
$this->
createMock(Connection::
class);
$this->helper =
$this->
createMock(ElasticsearchHelper::
class);
$this->registry =
new ElasticsearchRegistry([$this->
createDefinition('product'
)]);
$this->indexCreator =
$this->
createMock(IndexCreator::
class);
$this->iteratorFactory =
$this->
createMock(IteratorFactory::
class);
$this->client =
$this->
createMock(Client::
class);
$this->currencyRepository =
$this->
createMock(EntityRepository::
class);
$this->languageRepository =
$this->
createMock(EntityRepository::
class);
$this->newEsIndexer =
$this->
createMock(MultilingualEsIndexer::
class);
$this->bus =
new CollectingMessageBus();
$this->helper->
method('allowIndexing'
)->
willReturn(true
);
$this->language1 =
new LanguageEntity();