public function testDataValueIsNotArray(): void
{ $config =
$this->
encode();
static::
assertNull($config);
} /**
* @param array<string, mixed> $data
*/
private function encode(?array
$data = null, ?Field
$field = null
): ?string
{ $field ??=
new FlowTemplateConfigField('config', 'config'
);
$existence =
new EntityExistence('config',
['someId' => true
], true, false, false,
[]);
$keyPair =
new KeyValuePair('someId',
$data, false
);
$bag =
new WriteParameterBag( $this->
createMock(FlowTemplateDefinition::
class),
WriteContext::
createFromContext(Context::
createDefaultContext()),
'',
new WriteCommandQueue() );
$data =
iterator_to_array($this->serializer->
encode($field,
$existence,
$keyPair,
$bag));