public function testMatching(bool
$withRules, bool
$diffrentId, bool
$expected): void
{ $lineItem =
$this->
createProductItem(50, 10
);
$lineItem->
setReferencedId($lineItem->
getId());
$ruleCollection =
new RuleCollection();
if ($withRules === true
) { $matchId =
$diffrentId === true ? Uuid::
randomHex() :
$lineItem->
getId();
$ruleCollection->
add($this->
buildRuleEntity( $this->
getProductsRule([$matchId]) ));
} $group =
new LineItemGroupDefinition('test', 'COUNT', 1, 'PRICE_ASC',
$ruleCollection);
static::
assertEquals($expected,
$this->matcher->
isMatching($group,
$lineItem,
$this->context
));
} /**
* @return iterable<string, array<bool>>
*/