assertVariationsInListing example

->create(Uuid::randomHex()$this->salesChannelId);

        $listing = $this->getContainer()
            ->get(ProductListingRoute::class)
            ->load($this->categoryId, $request$contextnew Criteria())
            ->getResult();
        $products = $listing->getEntities();

        static::assertCount(10, $products);
        static::assertFalse($products->has($this->testData->getId('product1')));

        self::assertVariationsInListing($products[
            $this->testData->getId('product1-red-l-steel'),
            $this->testData->getId('product1-red-xl-steel'),
            $this->testData->getId('product1-red-l-iron'),
            $this->testData->getId('product1-red-xl-iron'),
        ]);
        self::assertVariationsInListing($products[
            $this->testData->getId('product1-green-l-steel'),
            $this->testData->getId('product1-green-xl-steel'),
            $this->testData->getId('product1-green-l-iron'),
            $this->testData->getId('product1-green-xl-iron'),
        ]);

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