protected function FieldHelperTestCase::createField in Helper 7
1 call to FieldHelperTestCase::createField()
- FieldHelperTestCase::setUp in tests/
FieldHelperTestCase.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
FieldHelperTestCase.test, line 46
Class
Code
protected function createField($type, array $extra = array()) {
$field = array(
'field_name' => 'field_' . $type,
'type' => $type,
);
$field = drupal_array_merge_deep($field, $extra);
return field_create_field($field);
}