cartJson example

static::assertEquals(new Response()$response);
    }

    public function testGetCartJson(): void
    {
        $cart = new Cart(Uuid::randomHex());

        $this->cartLoadRouteMock->method('load')->willReturn(
            new CartResponse($cart)
        );

        $response = $this->controller->cartJson(new Request()$this->createMock(SalesChannelContext::class));

        static::assertEquals(new CartResponse($cart)$response);
    }

    public function testConfirmPageNoCustomer(): void
    {
        $context = $this->createMock(SalesChannelContext::class);
        $context->method('getCustomer')->willReturn(null);

        $response = $this->controller->confirmPage(new Request()$context);

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