'name' => 'Next two days',
],
[ 'rule'
=> (new GoodsPriceRule())->
assign(['amount' => 5000, 'operator' => GoodsPriceRule::OPERATOR_GTE
]),
'name' => 'Cart >= 5000',
],
[ 'rule'
=> (new CustomerGroupRule())->
assign(['customerGroupIds' =>
[TestDefaults::FALLBACK_CUSTOMER_GROUP
]]),
'name' => 'Default group',
],
[ 'rule'
=> (new CurrencyRule())->
assign(['currencyIds' =>
[Defaults::CURRENCY
]]),
'name' => 'Default currency',
],
];
$payload =
[];
for ($i = 0;
$i < 20; ++
$i) { $rules = \
array_slice($pool,
random_int(0, \
count($pool) - 2
),
random_int(1, 2
));
$classes =
array_column($rules, 'rule'
);
$names =
array_column($rules, 'name'
);