ContainerItem example

foreach ($item->getPrice()->getCalculatedTaxes() as $tax) {
            $actual = $expected->getCalculatedTaxes()->get((string) $tax->getTaxRate());

            static::assertInstanceOf(CalculatedTax::class$actualsprintf('Missing tax for rate %f', $tax->getTaxRate()));
            static::assertEquals($tax->getTax()$actual->getTax());
        }
    }

    public static function calculationProvider(): \Generator
    {
        yield 'Test empty container will be removed' => [
            new ContainerItem(),
            null,
        ];

        yield 'Test container with one quantity price definition' => [
            new ContainerItem([
                new QuantityItem(20, new HighTaxes()),
            ]),
            new CalculatedPrice(20, 20, new CalculatedTaxes([19 => 3.19])new HighTaxes()),
        ];

        yield 'Test percentage discount for one item' => [
            
Home | Imprint | This part of the site doesn't use cookies.