static::
expectExceptionMessage('Line item download file with id "foo" not found.'
);
$this->downloadRoute->
load($request,
$this->salesChannelContext
);
} public function testReturnsResponse(): void
{ $customer =
new CustomerEntity();
$customer->
setId('foobar'
);
$this->salesChannelContext->
method('getCustomer'
)->
willReturn($customer);
$searchResult =
$this->
createMock(EntitySearchResult::
class);
$download =
new OrderLineItemDownloadEntity();
$download->
setMedia(new MediaEntity());
$searchResult->
method('first'
)->
willReturn($download);
$this->downloadRepository->
method('search'
)->
willReturn($searchResult);
$this->downloadResponseGenerator->
method('getResponse'
)->
willReturn(new Response());
$request =
new Request();
$request->request->
set('downloadId', 'foo'
);
$request->request->
set('orderId', 'bar'
);
$response =
$this->downloadRoute->
load($request,
$this->salesChannelContext
);