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