Skip to content

Commit

Permalink
TASK: Dont use new EventNormalizer() in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Dec 2, 2024
1 parent d13c153 commit 34fd834
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,26 @@ public function iRunTheEventMigration(RootNodeTypeMapping $rootNodeTypeMapping =
$propertyMapper = $this->getObject(PropertyMapper::class);

// HACK to access the property converter
$propertyConverterAccess = new class implements ContentRepositoryServiceFactoryInterface {
$crInternalsAccess = new class implements ContentRepositoryServiceFactoryInterface {
public PropertyConverter|null $propertyConverter;
public EventNormalizer|null $eventNormalizer;
public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): ContentRepositoryServiceInterface
{
$this->propertyConverter = $serviceFactoryDependencies->propertyConverter;
$this->eventNormalizer = $serviceFactoryDependencies->eventNormalizer;
return new class implements ContentRepositoryServiceInterface
{
};
}
};
$this->getContentRepositoryService($propertyConverterAccess);
$this->getContentRepositoryService($crInternalsAccess);

$eventExportProcessor = new EventExportProcessor(
$nodeTypeManager,
$propertyMapper,
$propertyConverterAccess->propertyConverter,
$crInternalsAccess->propertyConverter,
$this->currentContentRepository->getVariationGraph(),
$this->getObject(EventNormalizer::class),
$crInternalsAccess->eventNormalizer,
$rootNodeTypeMapping ?? RootNodeTypeMapping::fromArray(['/sites' => NodeTypeNameFactory::NAME_SITES]),
$this->nodeDataRows
);
Expand Down

0 comments on commit 34fd834

Please sign in to comment.