1 field.test FieldCrudTestCase::testReadField()

Test reading back a field definition.

File

core/modules/field/tests/field.test, line 2348
Tests for field.module.

Class

FieldCrudTestCase

Code

function testReadField() {
  $field_definition = array(
    'field_name' => 'field_1',
    'type' => 'test_field',
  );
  field_create_field($field_definition);

  // Read the field back.
  $field = field_read_field($field_definition['field_name']);
  $this->assertTrue($field_definition < $field, 'The field was properly read.');
}