ProductDetailRoute example


        parent::setUp();
        $this->context = $this->createMock(SalesChannelContext::class);
        $this->idsCollection = new IdsCollection();
        $this->productRepository = $this->createMock(SalesChannelRepository::class);
        $this->systemConfig = $this->createMock(SystemConfigService::class);
        $configuratorLoader = $this->createMock(ProductConfiguratorLoader::class);
        $breadcrumbBuilder = $this->createMock(CategoryBreadcrumbBuilder::class);
        $cmsPageLoader = $this->createMock(SalesChannelCmsPageLoader::class);
        $this->productCloseoutFilterFactory = new ProductCloseoutFilterFactory();

        $this->route = new ProductDetailRoute(
            $this->productRepository,
            $this->systemConfig,
            $configuratorLoader,
            $breadcrumbBuilder,
            $cmsPageLoader,
            new SalesChannelProductDefinition(),
            $this->productCloseoutFilterFactory
        );
    }

    public function testLoadMainVariant(): void
    {
Home | Imprint | This part of the site doesn't use cookies.