]),
new PriceAssertion(2.0, 3.0, null, 4.0
),
];
yield 'Cheapest price calculation uses the cheapest price container' =>
[ (new PartialEntity())->
assign([ 'taxId' => Uuid::
randomHex(),
'price' =>
new PriceCollection([ new Price(Defaults::CURRENCY, 2, 2, false,
new Price(Defaults::CURRENCY, 3, 3, false
), null,
new Price(Defaults::CURRENCY, 4, 4, false
)),
]),
'cheapestPrice'
=> (new CheapestPrice())->
assign([ 'price' =>
new PriceCollection([ new Price(Defaults::CURRENCY, 20, 20, false,
new Price(Defaults::CURRENCY, 30, 30, false
), null,
new Price(Defaults::CURRENCY, 40, 40, false
)),
]),
'variantId' => Uuid::
randomHex(),
'hasRange' => true,
]),
]),
new PriceAssertion(20.0, 30.0, null, 40.0
),
];
}}