| 1 field.test | FieldCrudTestCase::testActive() | 
Test that fields are properly marked active or inactive.
File
- core/modules/ field/ tests/ field.test, line 2540 
- Tests for field.module.
Class
Code
function testActive() {
  $field_definition = array(
    'field_name' => 'field_1',
    'type' => 'test_field',
    // For this test, we need a storage backend provided by a different
    // module than field_test.module.
    'storage' => array(
      'type' => 'field_sql_storage',
    ),
  );
  field_create_field($field_definition);
  // Test disabling and enabling:
  // - the field type module,
  // - the storage module,
  // - both.
  $this->_testActiveHelper($field_definition, array('field_test'));
  $this->_testActiveHelper($field_definition, array('field_sql_storage'));
  $this->_testActiveHelper($field_definition, array('field_test', 'field_sql_storage'));
}
