function WebformAutofillAttributeTestCase::testWebformComponents in Webform Autofill Attribute 7
Overrides the testWebformComponents function in webform.test with our needed component.
Return value
array An array of each component settings.
File
- tests/
webform_autofill_attribute.test, line 49
Class
Code
function testWebformComponents() {
if (isset($this->_webform_components)) {
return $this->_webform_components;
}
$this->_webform_components = array(
// Test textfield components.
'textfield' => array(
'component' => array(
'form_key' => 'textfield',
'name' => 'Textfield',
'type' => 'textfield',
'value' => '',
'required' => '0',
'pid' => '0',
'extra' => array(
'attributes' => array(
'autocomplete' => $this
->getTestAttribute(),
),
),
'weight' => '0',
),
'sample values' => '',
'database values' => array(
'',
),
'database default values' => array(
'',
),
),
);
return $this->_webform_components;
}