->
willReturn('http://localhost/account/order'
);
$dispatcher =
static::
createMock(EventDispatcherInterface::
class);
$container =
new ContainerBuilder();
$container->
set('router',
$router);
$container->
set('event_dispatcher',
$dispatcher);
$this->controller->
setContainer($container);
$this->orderRouteMock->
method('load'
)->
willReturn($accountRouteResponse);
$this->accountEditOrderPageLoaderMock->
method('load'
)->
willThrowException(OrderException::
orderAlreadyPaid($ids->
get('order'
)));
$response =
$this->controller->
editOrder($ids->
get('order'
),
new Request(),
$salesChannelContext);
// Ensure flash massage is shown
static::
assertEquals('danger error.CHECKOUT__ORDER_ORDER_ALREADY_PAID',
$this->controller->flash
);
static::
assertEquals(new RedirectResponse('http://localhost/account/order'
),
$response);
}}/**
* @internal
*/