function autocompleteWidgetsAllowedValuesTest::setUp in Autocomplete Widgets for Text and Number Fields 7
Implementation of setUp().
Overrides autocompleteWidgetsBaseTest::setUp
File
- tests/
autocomplete_widgets.test, line 123
Class
Code
function setUp() {
parent::setUp();
// Attach a list field to the article content type.
$this->field = array(
'field_name' => 'allowed_values',
'type' => 'list_text',
'cardinality' => 1,
'settings' => array(
'allowed_values' => $this->test_values,
),
);
$this->field = field_create_field($this->field);
// Set the autocomplete_path for quick reference.
$this->path = 'autocomplete_widgets/node/article/' . $this->field['field_name'] . '/';
}