ProductUpdater example



    public function testUpdate(): void
    {
        $indexer = $this->createMock(ElasticsearchIndexer::class);
        $definition = $this->createMock(EntityDefinition::class);

        $indexer->expects(static::once())->method('updateIds')->with($definition['id1', 'id2']);

        $event = new ProductIndexerEvent(['id1', 'id2'], Context::createDefaultContext());

        $updater = new ProductUpdater($indexer$definition);
        $updater->update($event);
    }
}
Home | Imprint | This part of the site doesn't use cookies.