private EntityRepository
$conditionRepository;
private Context
$context;
private BillingZipCodeRule
$rule;
protected function setUp(): void
{ $this->ruleRepository =
$this->
getContainer()->
get('rule.repository'
);
$this->conditionRepository =
$this->
getContainer()->
get('rule_condition.repository'
);
$this->context = Context::
createDefaultContext();
$this->rule =
new BillingZipCodeRule();
} public function testValidateWithMissingZipCodes(): void
{ // reset from previous tests
$this->
getContainer()->
get(BillingZipCodeRule::
class)->
assign(['operator' => Rule::OPERATOR_EQ, 'zipCodes' => null
]);
$conditionId = Uuid::
randomHex();
try { $this->conditionRepository->
create([ [