Tests editing an existing field.
function updateField() {
// Go to the field edit page.
$this
->drupalGet('admin/structure/types/manage/' . $this->hyphen_type . '/fields/' . $this->field_name);
// Populate the field settings with new settings.
$string = 'updated dummy test string';
$edit = array(
'field[settings][test_field_setting]' => $string,
'instance[settings][test_instance_setting]' => $string,
'instance[widget][settings][test_widget_setting]' => $string,
);
$this
->drupalPost(NULL, $edit, t('Save settings'));
// Assert the field settings are correct.
$this
->assertFieldSettings($this->type, $this->field_name, $string);
// Assert redirection back to the "manage fields" page.
$this
->assertText(t('Saved @label configuration.', array(
'@label' => $this->field_label,
)), 'Redirected to "Manage fields" page.');
}