$stubs =
new ScriptPriceStubs($connection,
$this->
createMock(QuantityPriceCalculator::
class),
$this->
createMock(PercentagePriceCalculator::
class));
$actual =
$stubs->
build($prices);
foreach ($expected as $expectedPrice) { $actualPrice =
$actual->
getCurrencyPrice($expectedPrice->
getCurrencyId());
static::
assertInstanceOf(Price::
class,
$actualPrice);
static::
assertEquals($expectedPrice->
getNet(),
$actualPrice->
getNet());
static::
assertEquals($expectedPrice->
getGross(),
$actualPrice->
getGross());
static::
assertEquals($expectedPrice->
getLinked(),
$actualPrice->
getLinked());
} } public static function priceCases(): \Generator
{ yield 'manual price definition' =>
[ [ 'default' =>
['gross' => 100, 'net' => 90
],
'USD' =>
['gross' => 90, 'net' => 80
],
],
new PriceCollection([