->
willReturn($searchResult);
$repositoryMock->
expects(static::
once()) ->
method('update'
) ->
willThrowException(new \
Exception());
/** @var list<string> $allowed */
$allowed =
$this->
getContainer()->
getParameter('shopware.filesystem.allowed_extensions'
);
/** @var list<string> $allowedPrivate */
$allowedPrivate =
$this->
getContainer()->
getParameter('shopware.filesystem.private_allowed_extensions'
);
$fileSaverWithFailingRepository =
new FileSaver( $repositoryMock,
$this->
getContainer()->
get('shopware.filesystem.public'
),
$this->
getContainer()->
get('shopware.filesystem.private'
),
$this->
getContainer()->
get(UrlGeneratorInterface::
class),
$this->
getContainer()->
get(ThumbnailService::
class),
$this->
getContainer()->
get(MetadataLoader::
class),
$this->
getContainer()->
get(TypeDetector::
class),
$this->
getContainer()->
get('messenger.bus.shopware'
),
$this->
getContainer()->
get('event_dispatcher'
),
$allowed,
$allowedPrivate );