UnitEntity example


class ProductPriceCalculatorTest extends TestCase
{
    private ProductPriceCalculator $calculator;

    protected function setUp(): void
    {
        $this->calculator = new ProductPriceCalculator(
            new StaticEntityRepository([
                new UnitCollection([(
                new UnitEntity())->assign(['id' => Defaults::CURRENCY, 'translated' => ['name' => 'test']])]),
            ]),
            new QuantityPriceCalculator(
                new GrossPriceCalculator(new TaxCalculator()new CashRounding()),
                new NetPriceCalculator(new TaxCalculator()new CashRounding())
            )
        );
    }

    /** * @dataProvider priceWillBeCalculated */
    
Home | Imprint | This part of the site doesn't use cookies.