function ListFieldTestCase::setUp
Overrides FieldTestCase::setUp
File
-
modules/
field/ modules/ list/ tests/ list.test, line 24
Class
- ListFieldTestCase
- Tests for the 'List' field types.
Code
function setUp() {
parent::setUp('field_test');
$this->field_name = 'test_list';
$this->field = array(
'field_name' => $this->field_name,
'type' => 'list_integer',
'cardinality' => 1,
'settings' => array(
'allowed_values' => array(
1 => 'One',
2 => 'Two',
3 => 'Three',
),
),
);
$this->field = field_create_field($this->field);
$this->instance = array(
'field_name' => $this->field_name,
'entity_type' => 'test_entity',
'bundle' => 'test_bundle',
'widget' => array(
'type' => 'options_buttons',
),
);
$this->instance = field_create_instance($this->instance);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.