static::
assertCount(1,
$customFieldSet->
getFields());
$singleEntitySelectField =
$customFieldSet->
getFields()[0
];
static::
assertInstanceOf(SingleEntitySelectField::
class,
$singleEntitySelectField);
static::
assertEquals('test_single_entity_select_field',
$singleEntitySelectField->
getName());
static::
assertEquals([ 'en-GB' => 'Test single-entity-select field',
],
$singleEntitySelectField->
getLabel());
static::
assertEquals([],
$singleEntitySelectField->
getHelpText());
static::
assertEquals(1,
$singleEntitySelectField->
getPosition());
static::
assertEquals(['en-GB' => 'Choose an entity...'
],
$singleEntitySelectField->
getPlaceholder());
static::
assertFalse($singleEntitySelectField->
getRequired());
static::
assertEquals('product',
$singleEntitySelectField->
getEntity());
} public function testToEntityArray(): void
{ $singleEntitySelectField =
$this->
importCustomField(__DIR__ . '/_fixtures/single-entity-select-field.xml'
);
static::
assertEquals('test_single_entity_select_field',
$singleEntitySelectField->
getName());
static::
assertEquals('entity',
$singleEntitySelectField->
getType());
static::
assertTrue($singleEntitySelectField->
isActive());