23 private $stockConfiguration;
31 \
Magento\CatalogInventory\Api\StockConfigurationInterface::class
43 public function testReindexEntity()
53 $product->setWebsiteIds([1, $testWebsite->getId()])->save();
56 $criteriaFactory = $this->getObject(
57 \
Magento\CatalogInventory\Api\StockStatusCriteriaInterfaceFactory::class
61 \
Magento\CatalogInventory\Api\StockStatusRepositoryInterface::class
63 $criteria = $criteriaFactory->create();
64 $criteria->setProductsFilter([
$product->getId()]);
65 $criteria->addFilter(
'website',
'website_id', $this->stockConfiguration->getDefaultScopeId());
70 private function getObject(
$class)
72 return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
$_option $_optionId $class
static getObjectManager()