protected $fieldConfigEditForm;
/**
* {@inheritdoc}
*/
protected function setUp(): void
{ parent::
setUp();
$entity_type_bundle_info =
$this->
createMock('\Drupal\Core\Entity\EntityTypeBundleInfoInterface'
);
$typed_data =
$this->
createMock('\Drupal\Core\TypedData\TypedDataManagerInterface'
);
$this->fieldConfigEditForm =
new FieldConfigEditForm($entity_type_bundle_info,
$typed_data);
} /**
* @covers ::hasAnyRequired
*
* @dataProvider providerRequired
*/
public function testHasAnyRequired(array
$element, bool
$result) { $reflection =
new \
ReflectionClass('\Drupal\field_ui\Form\FieldConfigEditForm'
);
$method =
$reflection->
getMethod('hasAnyRequired'
);
$this->
assertEquals($result,
$method->
invoke($this->fieldConfigEditForm,
$element));
}