$price =
$product->
get('calculatedPrice'
);
static::
assertInstanceOf(CalculatedPrice::
class,
$price);
static::
assertEquals($expected,
$price->
getTotalPrice());
} public static function taxStateWillBeUsedProvider(): \Generator
{ $product =
(new PartialEntity())->
assign([ 'taxId' => Uuid::
randomHex(),
'price' =>
new PriceCollection([ new Price(Defaults::CURRENCY, 10, 20, false
),
]),
]);
yield 'Gross price will be used for gross state' =>
[$product, CartPrice::TAX_STATE_GROSS, 20
];
yield 'Net price will be used for net price state' =>
[$product, CartPrice::TAX_STATE_NET, 10
];
yield 'Net price will be used for tax free state' =>
[$product, CartPrice::TAX_STATE_FREE, 10
];
}