/**
  * @param array $configurableIds
  * @param \Magento\CatalogRule\Model\Indexer\Product\ProductRuleIndexer $subject
  *
  * @return array
  */
 private function reindexSubProducts(array $configurableIds, \Magento\CatalogRule\Model\Indexer\Product\ProductRuleIndexer $subject)
 {
     $subProducts = [];
     if ($configurableIds) {
         $subProducts = array_values($this->configurable->getChildrenIds($configurableIds)[0]);
         if ($subProducts) {
             $subject->executeList($subProducts);
         }
     }
     return $subProducts;
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function executeRow($id)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'executeRow');
     if (!$pluginInfo) {
         return parent::executeRow($id);
     } else {
         return $this->___callPlugins('executeRow', func_get_args(), $pluginInfo);
     }
 }
Beispiel #3
0
 public function testDoExecuteRow()
 {
     $id = 5;
     $this->indexBuilder->expects($this->once())->method('reindexById')->with($id);
     $this->indexer->executeRow($id);
 }