21 private $productRepository;
31 private $productAssert;
44 $this->optionList = $optionList;
45 $this->productAssert = $productAssert;
57 $bundleSkuSuffix =
'2-2';
58 $product = $this->productRepository->get(
62 $this->productAssert->assertProductsCount(
66 $this->productAssert->assertProductType(
'bundle',
$product);
68 if (2 !== count($this->optionList->getItems(
$product))) {
69 throw new \AssertionError(
'Bundle options amount is wrong');
73 if (2 !== count(
$option->getProductLinks())) {
74 throw new \AssertionError(
'Bundle option product links amount is wrong');
__construct(\Magento\Catalog\Api\ProductRepositoryInterface $productRepository, \Magento\Bundle\Model\Product\OptionList $optionList, \Magento\Setup\Fixtures\FixturesAsserts\ProductAssert $productAssert)