10 ->loadByCode(
'catalog_category')
14 'attribute_code' =>
'attribute_for_sales_rule_1',
16 'backend_type' =>
'varchar',
18 'is_user_defined' => 1,
20 'is_used_for_promo_rules' => 1,
32 'name' =>
'50% Off on some attribute',
34 'customer_group_ids' => [\
Magento\Customer\Model\GroupManagement::NOT_LOGGED_IN_ID],
35 'coupon_type' => \
Magento\SalesRule\Model\Rule::COUPON_TYPE_NO_COUPON,
36 'simple_action' =>
'by_percent',
37 'discount_amount' => 50,
39 'stop_rules_processing' => 1,
41 \
Magento\TestFramework\Helper\Bootstrap::getObjectManager()->
get(
42 \
Magento\Store\Model\StoreManagerInterface::class
43 )->getWebsite()->getId()
49 'type' => \
Magento\SalesRule\Model\Rule\Condition\Combine::class,
53 'is_value_processed' =>
null,
54 'aggregator' =>
'all',
57 'type' => \
Magento\SalesRule\Model\Rule\Condition\Product\Found::class,
61 'is_value_processed' =>
null,
62 'aggregator' =>
'all',
65 'type' => \
Magento\SalesRule\Model\Rule\Condition\Product::class,
66 'attribute' =>
'attribute_for_sales_rule_1',
69 'is_value_processed' =>
false,
static getObjectManager()