9 use \Magento\Catalog\Plugin\Model\Indexer\Category\Product\Execute;
24 $this->config = $this->getMockBuilder(\
Magento\PageCache\Model\Config::class)
25 ->disableOriginalConstructor()
26 ->setMethods([
'isEnabled'])
28 $this->typeList = $this->getMockBuilder(\
Magento\Framework\
App\Cache\TypeListInterface::class)
29 ->disableOriginalConstructor()
30 ->setMethods([
'invalidate'])
31 ->getMockForAbstractClass();
33 $this->execute =
new Execute($this->config, $this->typeList);
38 $subject = $this->getMockBuilder(\
Magento\Catalog\Model\Indexer\Category\Product\AbstractAction::class)
39 ->disableOriginalConstructor()
40 ->getMockForAbstractClass();
42 $result = $this->getMockBuilder(\
Magento\Catalog\Model\Indexer\Category\Product\AbstractAction::class)
43 ->disableOriginalConstructor()
44 ->getMockForAbstractClass();
46 $this->config->expects($this->once())
49 $this->typeList->expects($this->never())
50 ->method(
'invalidate');
54 $this->execute->afterExecute($subject,
$result)
60 $subject = $this->getMockBuilder(\
Magento\Catalog\Model\Indexer\Category\Product\AbstractAction::class)
61 ->disableOriginalConstructor()
62 ->getMockForAbstractClass();
64 $result = $this->getMockBuilder(\
Magento\Catalog\Model\Indexer\Category\Product\AbstractAction::class)
65 ->disableOriginalConstructor()
66 ->getMockForAbstractClass();
68 $this->config->expects($this->once())
71 $this->typeList->expects($this->once())
72 ->method(
'invalidate')
77 $this->execute->afterExecute($subject,
$result)
testAfterExecuteInvalidate()