getCountRowsInProductCategoryTree example

$this->productRepository->update([
            [
                'id' => $productFixture['testable-product'],
                'categories' => \array_map(fn (string $categoryId) => ['id' => $categoryId]$categoryIds),
            ],
        ]$this->context);

        static::assertSame($categoryIds$this->getProductCategoryList($productFixture['testable-product']));
        static::assertEquals(
            \count($categoryIds),
            $this->getCountRowsInProductCategoryTree($productFixture['testable-product']$categoryIds)
        );

        static::assertSame($categoryIds$this->getProductCategoryList($productFixture['variant-testable-product']));
        static::assertEquals(
            \count($categoryIds),
            $this->getCountRowsInProductCategoryTree($productFixture['variant-testable-product']$categoryIds)
        );
    }

    /** * @return list<string>|null */
Home | Imprint | This part of the site doesn't use cookies.