static::
assertSame('cartLineItemVariantValue',
$this->rule->
getName());
} public function testConstraints(): void
{ $constraints =
$this->rule->
getConstraints();
static::
assertArrayHasKey('identifiers',
$constraints, 'identifiers constraint not found'
);
static::
assertArrayHasKey('operator',
$constraints, 'operator constraint not found'
);
static::
assertEquals(RuleConstraints::
uuids(),
$constraints['identifiers'
]);
static::
assertEquals(RuleConstraints::
uuidOperators(false
),
$constraints['operator'
]);
} /**
* @dataProvider getMatchValues
*
* @param list<string> $identifiers
* @param list<string> $itemOptionIds
*/
public function testCartScopeMatching(bool
$expected, array
$itemOptionIds, array
$identifiers, string
$operator): void
{ $lineItem =
new LineItem(Uuid::
randomHex(), LineItem::PRODUCT_LINE_ITEM_TYPE, null, 1
);