13 use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
21 private $productRepository;
26 private $productCollectionFactory;
31 private $indexerProcessor;
48 public function testFullReindexIfChildHasSpecialPrice()
52 $childProduct = $this->productRepository->get(
'simple_10',
true);
57 $collection = $this->productCollectionFactory->create();
64 self::assertEquals(10,
$items[0]->getData(
'min_price'));
66 $this->indexerProcessor->reindexAll();
69 $collection = $this->productCollectionFactory->create();
76 self::assertEquals($specialPrice,
$item->getData(
'min_price'));
85 public function testOnSaveIndexationIfChildHasSpecialPrice()
89 $childProduct = $this->productRepository->get(
'simple_10',
true);
94 $collection = $this->productCollectionFactory->create();
101 self::assertEquals($specialPrice,
$item->getData(
'min_price'));
static getObjectManager()