public function testRuleMatching(string
$operator, bool
$isMatching, array
$ruleIdentifiers, array|string|null
$givenIdentifier, bool
$noCustomer = false
): void
{ $customer =
new CustomerEntity();
/** @var list<string> $customerIdentifiers */
$customerIdentifiers =
array_filter(\
is_array($givenIdentifier) ?
$givenIdentifier :
[$givenIdentifier]);
$customer->
setTagIds($customerIdentifiers);
if ($noCustomer) { $customer = null;
} $scope =
$this->
createScope($customer);
$this->rule->
assign(['identifiers' =>
$ruleIdentifiers, 'operator' =>
$operator]);
$match =
$this->rule->
match($scope);
if ($isMatching) { static::
assertTrue($match);
}