page example

$this->createMock(ProductReviewLoader::class),
            $this->createMock(FindProductVariantRoute::class),
            $eventDispatcherMock
        );
    }

    public function testPageNoId(): void
    {
        $this->expectException(RoutingException::class);
        $this->expectExceptionMessage('Parameter "id" is missing.');

        $this->controller->page(null, new Request()$this->createMock(SalesChannelContext::class));
    }

    public function testPageReturn(): void
    {
        $cmsRouteResponse = new CmsRouteResponse(new CmsPageEntity());
        $this->cmsRouteMock->method('load')->willReturn($cmsRouteResponse);

        $ids = new IdsCollection();

        $this->controller->page($ids->get('page')new Request()$this->createMock(SalesChannelContext::class));

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