$ruleConstraints =
$this->rule->
getConstraints();
static::
assertArrayHasKey('operator',
$ruleConstraints, 'Constraint operator not found in Rule'
);
$operators =
$ruleConstraints['operator'
];
static::
assertEquals(new NotBlank(),
$operators[0
]);
static::
assertEquals(new Choice($expectedOperators),
$operators[1
]);
$this->rule->
assign(['operator' => Rule::OPERATOR_EQ
]);
static::
assertArrayHasKey('zipCodes',
$ruleConstraints, 'Constraint zipCodes not found in Rule'
);
$zipCodes =
$ruleConstraints['zipCodes'
];
static::
assertEquals(new NotBlank(),
$zipCodes[0
]);
static::
assertEquals(new ArrayOfType('string'
),
$zipCodes[1
]);
} /**
* @dataProvider getMatchValuesNumeric
*/
public function testRuleMatchingNumeric(string
$operator, bool
$isMatching, string
$zipCode): void
{ $zipCodes =
['90210', '81985'
];
$salesChannelContext =
$this->
createMock(SalesChannelContext::
class);
$customerAddress =
new CustomerAddressEntity();