6 declare(strict_types=1);
18 require
__DIR__ .
'/../../../../../../dev/tests/integration/testsuite/Magento/Catalog/_files/products.php';
19 require
__DIR__ .
'/product_simple_out_of_stock.php';
30 ->setAttributeSetId(4)
32 ->setName(
'Bundle Product In Stock')
33 ->setSku(
'bundle-product-in-stock')
34 ->setVisibility(\
Magento\Catalog\Model\
Product\Visibility::VISIBILITY_BOTH)
35 ->setStatus(\
Magento\Catalog\Model\
Product\Attribute\Source\Status::STATUS_ENABLED)
36 ->setStockData([
'use_config_manage_stock' => 1,
'qty' => 100,
'is_qty_decimal' => 0,
'is_in_stock' => 1])
41 ->setBundleOptionsData(
44 'title' =>
'Bundle Product Items',
45 'default_title' =>
'Bundle Product Items',
46 'type' =>
'select',
'required' => 1,
51 ->setBundleSelectionsData(
57 'selection_can_change_qty' => 1,
73 if (!empty($bundleLinks[$key])) {
74 foreach ($bundleLinks[$key] as
$linkData) {
80 $link->setSku($linkProduct->getSku());
82 if (isset(
$linkData[
'selection_can_change_qty'])) {
83 $link->setCanChangeQuantity(
$linkData[
'selection_can_change_qty']);
104 ->setAttributeSetId(4)
106 ->setName(
'Bundle Product Out Of Stock')
107 ->setSku(
'bundle-product-out-of-stock')
108 ->setVisibility(\
Magento\Catalog\Model\
Product\Visibility::VISIBILITY_BOTH)
109 ->setStatus(\
Magento\Catalog\Model\
Product\Attribute\Source\Status::STATUS_ENABLED)
111 'use_config_manage_stock' => 1,
112 'use_config_backorders' => 1,
114 'is_qty_decimal' => 0,
121 ->setBundleOptionsData(
124 'title' =>
'Bundle Product Items',
125 'default_title' =>
'Bundle Product Items',
126 'type' =>
'select',
'required' => 1,
131 ->setBundleSelectionsData(
136 'selection_qty' => 1,
137 'selection_can_change_qty' => 1,
153 if (!empty($bundleLinks[$key])) {
154 foreach ($bundleLinks[$key] as
$linkData) {
160 $link->setSku($linkProduct->getSku());
162 if (isset(
$linkData[
'selection_can_change_qty'])) {
163 $link->setCanChangeQuantity(
$linkData[
'selection_can_change_qty']);
defined('TESTS_BP')||define('TESTS_BP' __DIR__
static getObjectManager()