AppScriptProductPriceCalculator example

$products = [
            new SalesChannelProductEntity(),
            new SalesChannelProductEntity(),
        ];

        $executor = $this->createMock(ScriptExecutor::class);
        $executor->expects(static::once())->method('execute');

        $decorated = $this->createMock(ProductPriceCalculator::class);
        $decorated->expects(static::once())->method('calculate')->with($products);

        $calculator = new AppScriptProductPriceCalculator($decorated$executor$this->createMock(ScriptPriceStubs::class));

        $calculator->calculate($products$this->createMock(SalesChannelContext::class));
    }
}
Home | Imprint | This part of the site doesn't use cookies.