You are here

function field_test_field_storage_create_field in SimpleTest 7

Implement hook_field_storage_create_field().

File

tests/field_test.module, line 1048

Code

function field_test_field_storage_create_field($field) {
  if ($field['storage']['type'] == 'field_test_storage_failure') {
    throw new Exception('field_test_storage_failure engine always fails to create fields');
  }
  $data = _field_test_storage_data();
  $data[$field['id']] = array(
    'current' => array(),
    'revisions' => array(),
  );
  _field_test_storage_data($data);
}