6 declare(strict_types=1);
15 use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
28 private $productRepository;
33 private $productCollectionFactory;
38 private $indexerProcessor;
57 public function testFullReindexIfChildHasSpecialPrice()
61 $childProduct = $this->productRepository->get(
'simple_10',
true);
66 $collection = $this->productCollectionFactory->create();
73 self::assertEquals(10,
$items[0]->getData(
'min_price'));
75 $this->indexerProcessor->reindexAll();
78 $collection = $this->productCollectionFactory->create();
85 self::assertEquals($specialPrice,
$item->getData(
'min_price'));
94 public function testOnSaveIndexationIfChildHasSpecialPrice()
98 $childProduct = $this->productRepository->get(
'simple_10',
true);
103 $collection = $this->productCollectionFactory->create();
110 self::assertEquals($specialPrice,
$item->getData(
'min_price'));
static getObjectManager()