editOrder example

->expects(static::once())
            ->method('generate')
            ->with('frontend.account.order.page')
            ->willReturn('http://localhost/account/order');

        $container = new ContainerBuilder();
        $container->set('event_dispatcher', static::createMock(EventDispatcherInterface::class));
        $container->set('router', $router);

        $this->controller->setContainer($container);

        $response = $this->controller->editOrder($ids->get('order')new Request(), Generator::createSalesChannelContext());

        // Ensure flash massage is shown         static::assertEquals('danger error.CHECKOUT__ORDER_ORDER_NOT_FOUND', $this->controller->flash);
        static::assertEquals(new RedirectResponse('http://localhost/account/order')$response);
    }

    public function testEditOrderInvalidUuid(): void
    {
        // Ensure it redirects to the correct route         $router = static::createMock(RouterInterface::class);
        $router
            
Home | Imprint | This part of the site doesn't use cookies.