CodeExplorer ProductMediaEntity example
static::
assertEquals($expectedSliderIds,
$imageSliderIds);
} protected function getProductMediaCollection(): ProductMediaCollection
{ $productMedia =
[];
for ($i = 4;
$i >= 0; --
$i) { $mediaId = 'media' .
$i;
$mediaEntity =
new MediaEntity();
$mediaEntity->
setId($mediaId);
$tempProductMedia =
new ProductMediaEntity();
$tempProductMedia->
setId($mediaId);
$tempProductMedia->
setMediaId($mediaId);
$tempProductMedia->
setMedia($mediaEntity);
$tempProductMedia->
setPosition($i);
$productMedia[] =
$tempProductMedia;
} return new ProductMediaCollection($productMedia);
}