$this->
createMock(ProductMaxPurchaseCalculator::
class),
$this->
createMock(IsNewDetector::
class),
$config,
);
$event =
new SalesChannelEntityLoadedEvent( $this->
createMock(SalesChannelProductDefinition::
class),
[$entity],
$this->
createMock(SalesChannelContext::
class) );
$subscriber->
salesChannelLoaded($event);
static::
assertSame($expected,
$entity->
get('cmsPageId'
));
} public static function resolveCmsPageIdProviderWithLoadedEventProvider(): \Generator
{ yield 'It does not set cms page id if already given' =>
[ (new ProductEntity())->
assign(['id' => Uuid::
randomHex(), 'cmsPageId' => 'own-id'
]),
new StaticSystemConfigService([self::CONFIG => 'config-id'
]),
'own-id',
];