function FieldInstanceCrudTestCase::testReadFieldInstance
Test reading back an instance definition.
File
-
modules/
field/ tests/ field.test, line 2997
Class
Code
function testReadFieldInstance() {
field_create_instance($this->instance_definition);
// Read the instance back.
$instance = field_read_instance('test_entity', $this->instance_definition['field_name'], $this->instance_definition['bundle']);
$this->assertTrue($this->instance_definition < $instance, 'The field was properly read.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.