class VariantListingConfigFieldSerializerTest extends TestCase
{ protected VariantListingConfigFieldSerializer
$serializer;
protected function setUp(): void
{ $definitionRegistry =
$this->
createMock(DefinitionInstanceRegistry::
class);
$validator =
$this->
createMock(ValidatorInterface::
class);
$validator->
method('validate'
)->
willReturn(new ConstraintViolationList());
$this->serializer =
new VariantListingConfigFieldSerializer($definitionRegistry,
$validator);
} public function testSingleMainVariant(): void
{ $data =
[ 'displayParent' => 1,
'mainVariantId' => Uuid::
randomHex(),
'configuratorGroupConfig' =>
[],
];
$result =
$this->
encode($data);