FieldInstanceCrudTestCase::testReadFieldInstance

  1. drupal
    1. 8
    2. 7
Versions
7 FieldInstanceCrudTestCase::testReadFieldInstance()

Test reading back an instance definition.

Code

modules/field/tests/field.test, line 2500

<?php
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, t('The field was properly read.'));
}
?>