function FieldSqlStorageTestCase::setUp
Overrides DrupalWebTestCase::setUp
File
-
modules/
field/ modules/ field_sql_storage/ field_sql_storage.test, line 29
Class
- FieldSqlStorageTestCase
- Tests field storage.
Code
function setUp() {
parent::setUp('field_sql_storage', 'field', 'field_test', 'text');
$this->field_name = strtolower($this->randomName());
$this->field = array(
'field_name' => $this->field_name,
'type' => 'test_field',
'cardinality' => 4,
);
$this->field = field_create_field($this->field);
$this->instance = array(
'field_name' => $this->field_name,
'entity_type' => 'test_entity',
'bundle' => 'test_bundle',
);
$this->instance = field_create_instance($this->instance);
$this->table = _field_sql_storage_tablename($this->field);
$this->revision_table = _field_sql_storage_revision_tablename($this->field);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.