$product->
setName('foo'
);
$product->
setStock(10
);
$product->
setCalculatedPrice( new CalculatedPrice(10, 10,
new CalculatedTaxCollection(),
new TaxRuleCollection()) );
$product->
setCalculatedCheapestPrice( new CalculatedCheapestPrice(8, 8,
new CalculatedTaxCollection(),
new TaxRuleCollection()) );
$product->
setCalculatedPrices(new PriceCollection([ new CalculatedPrice(9, 9,
new CalculatedTaxCollection(),
new TaxRuleCollection()),
]));
$context =
$this->
createMock(SalesChannelContext::
class);
$stubs =
$this->
createMock(ScriptPriceStubs::
class);
$proxy =
new ProductProxy($product,
$context,
$stubs);
// @phpstan-ignore-next-line > Access to an undefined property occurs here but the proxy by pass the access to the entity.get() function
static::
assertInstanceOf(PriceFacade::
class,
$proxy->calculatedPrice, 'Proxy should return a facade for the calculated price'
);