Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getMinPriceRule example
public
function
testMatchesForSingleRule
(
)
: void
{
$rules
=
new
AndRule
(
[
$this
->
getMinPriceRule
(
50
)
,
]
)
;
$ruleEntity
=
new
RuleEntity
(
)
;
$ruleEntity
->
setId
(
'R1'
)
;
$ruleEntity
->
setPayload
(
$rules
)
;
// create our 2 test product line items
$product50
=
new
LineItem
(
'ABC1', LineItem::PRODUCT_LINE_ITEM_TYPE
)
;
$product50
->
setPrice
(
new
CalculatedPrice
(
50, 50,
new
CalculatedTaxCollection
(
)
,
new
TaxRuleCollection
(
)
)
)
;