/**
* @dataProvider provideCategoryPaths
*/
public function testCategoryPathToAssignment(array
$categoriesToWrite, array
$record, array
$row, array
$assertion): void
{ $context = Context::
createDefaultContext();
$this->categoryRepository->
upsert($categoriesToWrite,
$context);
$event =
new ImportExportBeforeImportRecordEvent($record,
$row,
new Config([],
['sourceEntity' => ProductDefinition::ENTITY_NAME
],
[]),
$context);
$subscriber =
new ProductCategoryPathsSubscriber($this->categoryRepository,
$this->
getContainer()->
get(SyncService::
class));
$subscriber->
categoryPathsToAssignment($event);
static::
assertSame($assertion,
$event->
getRecord()['categories'
]);
}}