#[Package('business-ops')]
class CustomFieldRuleTest extends TestCase
{ private const CUSTOM_FIELD_NAME = 'custom_test';
public function testGetConstraints(): void
{ $ruleConstraints = CustomFieldRule::
getConstraints([]);
static::
assertArrayHasKey('operator',
$ruleConstraints, 'Rule Constraint operator is not defined'
);
static::
assertArrayHasKey('renderedField',
$ruleConstraints, 'Rule Constraint renderedField is not defined'
);
static::
assertArrayHasKey('renderedFieldValue',
$ruleConstraints, 'Rule Constraint renderedFieldValue is not defined'
);
static::
assertArrayHasKey('selectedField',
$ruleConstraints, 'Rule Constraint selectedField is not defined'
);
static::
assertArrayHasKey('selectedFieldSet',
$ruleConstraints, 'Rule Constraint selectedFieldSet is not defined'
);
} public function testGetConstraintsWithRenderedField(): void
{ $ruleConstraints = CustomFieldRule::
getConstraints(['type' => 'string'
]);