CodeExplorer addDefaultLocale example
$child =
[ 'id' => Uuid::
randomHex(),
'name' => 'a',
'parent_id' =>
$oldParent['id'
],
];
$existingData =
[$oldParent,
$child];
$this->
addLanguagesWithDefaultLocales($existingData);
$newParent =
$this->
addDefaultLocale([ 'id' => Uuid::
randomHex(),
'name' => 'c',
]);
$updChild =
[ 'id' =>
$child['id'
],
'parentId' =>
$newParent['id'
],
];
$this->
assertUpsertViolations([$newParent,
$updChild],
[]);
}