CodeExplorer createLineItemWithWidth example
string
$operator,
float
$amount,
?float
$lineItemAmount,
bool
$expected,
bool
$lineItemWithoutDeliveryInfo = false
): void
{ $this->rule->
assign([ 'amount' =>
$amount,
'operator' =>
$operator,
]);
$lineItem = self::
createLineItemWithWidth($lineItemAmount);
if ($lineItemWithoutDeliveryInfo) { $lineItem = self::
createLineItem();
} $match =
$this->rule->
match(new LineItemScope( $lineItem,
$this->
createMock(SalesChannelContext::
class) ));
static::
assertSame($expected,
$match);
}