15 private $productRuleProcessor;
34 $this->productRuleProcessor = $this
35 ->getMockBuilder(\
Magento\CatalogRule\Model\Indexer\
Product\ProductRuleProcessor::class)
36 ->disableOriginalConstructor()
40 ->disableOriginalConstructor()
43 $this->model = $this->getMockForAbstractClass(
44 \
Magento\Framework\Model\AbstractModel::class,
50 [
'getIsMassupdate',
'getId']
54 \
Magento\CatalogRule\Plugin\Indexer\
Product\Save\ApplyRules::class,
56 'productRuleProcessor' => $this->productRuleProcessor,
63 $this->model->expects($this->once())->method(
'getIsMassupdate')->willReturn(
null);
64 $this->model->expects($this->once())->method(
'getId')->willReturn(1);
66 $this->productRuleProcessor->expects($this->once())->method(
'reindexRow')->willReturnSelf();
70 $this->plugin->afterSave($this->subject, $this->subject, $this->model)