CodeExplorer setAreas example
$flow->
setFlowState(new FlowState());
$flow->
setData(OrderAware::ORDER,
$order);
$scopeBuilder->
method('build'
)->
willReturn( new FlowRuleScope($order,
new Cart('test'
),
$this->
createMock(SalesChannelContext::
class)) );
$rule =
new OrderTagRule(Rule::OPERATOR_EQ,
[$tagId]);
$ruleEntity =
new RuleEntity();
$ruleEntity->
setId($ruleId);
$ruleEntity->
setPayload($rule);
$ruleEntity->
setAreas([RuleAreas::FLOW_AREA
]);
$ruleLoader->
method('load'
)->
willReturn(new RuleCollection([$ruleEntity]));
$flowExecutor =
new FlowExecutor($eventDispatcher,
$appFlowActionProvider,
$ruleLoader,
$scopeBuilder,
[]);
$flowExecutor->
executeIf($ifSequence,
$flow);
static::
assertEquals($trueCaseSequence,
$flow->
getFlowState()->currentSequence
);
}}