/** * Handles asynchronous insertion of the new entity into * corresponding grid during cron job. * * Also method is used in the next events: * * - config_data_dev_grid_async_indexing_disabled * * Works only if asynchronous grid indexing is enabled * in global settings. * * @return void */ public function execute() { $this->asyncInsert->asyncInsert(); }
public function testAsyncInsertDisabled() { $this->scopeConfigurationMock->expects($this->once())->method('getValue')->with('dev/grid/async_indexing', 'default', null)->willReturn(false); $this->gridAggregatorMock->expects($this->never())->method('refreshBySchedule'); $this->unit->asyncInsert(); }
/** * Handles asynchronous insertion of the new entity into * corresponding grid during cron job. * * Also method is used in the next events: * * - config_data_dev_grid_async_indexing_disabled * * Works only if asynchronous grid indexing is enabled * in global settings. * * @param \Magento\Framework\Event\Observer $observer * @return void * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function execute(\Magento\Framework\Event\Observer $observer) { $this->asyncInsert->asyncInsert(); }