'name' => 'New customer',
],
[ 'rule'
=> (new DateRangeRule())->
assign(['fromDate' =>
new \
DateTime(), 'toDate'
=> (new \
DateTime())->
modify('+2 day'
)]),
'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
));