1.20.x field.test | FieldCrudTestCase::testReadField() |
Test reading back a field definition.
File
- modules/
field/ tests/ field.test, line 2322 - Tests for field.module.
Class
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.');
}