ProductListingRoute example


        $categoryId = 'categoryId';
        $categoryRepository = new StaticEntityRepository([
            new EntityCollection([
                new PartialEntity([
                    'id' => $categoryId,
                    'productAssignmentType' => CategoryDefinition::PRODUCT_ASSIGNMENT_TYPE_PRODUCT,
                ]),
            ]),
        ]);

        $controller = new ProductListingRoute(
            $this->createMock(ProductListingLoader::class),
            $categoryRepository,
            $this->createMock(ProductStreamBuilderInterface::class),
        );

        $criteria = new Criteria();
        $controller->load($categoryIdnew Request()$this->createMock(SalesChannelContext::class)$criteria);

        static::assertSame([
            'product.visibilities.visibility',
            'product.visibilities.salesChannelId',
            
Home | Imprint | This part of the site doesn't use cookies.