->
willReturn('bar'
);
$containerBuilder->
set('router',
$router);
$containerBuilder->
set('event_dispatcher',
static::
createMock(EventDispatcherInterface::
class));
$this->controller->
setContainer($containerBuilder);
$this->downloadRouteMock->
method('load'
)->
willReturn(new Response());
$request =
new Request();
$request->query->
set('deepLinkCode', 'foo'
);
$salesChannelContext =
$this->
createMock(SalesChannelContext::
class);
$response =
$this->controller->
downloadFile($request,
$salesChannelContext);
static::
assertInstanceOf(RedirectResponse::
class,
$response);
} public function testLoggedInResponseReturn(): void
{ $this->downloadRouteMock->
method('load'
)->
willReturn(new Response());
$salesChannelContext =
$this->
createMock(SalesChannelContext::
class);
$salesChannelContext->
expects(static::
once())->
method('getCustomer'
)->
willReturn(new CustomerEntity());
$response =
$this->controller->
downloadFile(new Request(),
$salesChannelContext);