$this->
createMock(ProductMaxPurchaseCalculator::
class),
$this->
createMock(IsNewDetector::
class),
$config,
);
$event =
new EntityLoadedEvent( $this->
createMock(ProductDefinition::
class),
[$entity],
Context::
createDefaultContext() );
$subscriber->
loaded($event);
static::
assertSame($expected,
$entity->
get('cmsPageId'
));
} /**
* @dataProvider resolveCmsPageIdProviderWithSalesChannelLoadedEventProvider
*/
public function testResolveCmsPageIdProviderWithSalesChannelLoadedEvent(Entity
$entity, SystemConfigService
$config, ?string
$expected): void
{ $subscriber =
new ProductSubscriber( $this->
createMock(ProductVariationBuilder::
class),