setCalculatedCheapestPrice example

public function testProxyPropertyAccess(): void
    {
        $product = new SalesChannelProductEntity();

        $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);

        
Home | Imprint | This part of the site doesn't use cookies.