ProductDefinition::
class D ' should not support ' .
$entity );
} } } public function testDeserializeProductMedia(): void
{ $product =
$this->
getProduct();
$mediaService =
$this->
createMock(MediaService::
class);
$expectedMediaFile =
new MediaFile( '/tmp/foo/bar/shopware-logo.png',
'image/png',
'png',
1000,
'bc0d90db4dd806bd671ae9f7fabc5796'
);
$mediaService->
expects(static::
any()) ->
method('fetchFile'
) ->
willReturnCallback(function DRequest
$request) use ($expectedMediaFile): MediaFile
{ if ($request->
get('url'
) === 'http://172.16.11.80/shopware-logo.png'
) { return $expectedMediaFile;
}