You are here

protected function RangeFieldUIWebTestCase::_testRangeFieldCreationUI in Range 7

Helper method. Creates range field via field UI.

Parameters

string $field_type: Range field type. Could be one of the following values: range_integer, range_float or range_decimal.

1 call to RangeFieldUIWebTestCase::_testRangeFieldCreationUI()
RangeFieldUIWebTestCase::_testRangeFieldUI in tests/range.field_ui.test
Helper method. Tests given range field type via field UI.

File

tests/range.field_ui.test, line 63
Contains range field UI tests.

Class

RangeFieldUIWebTestCase
Tests adding range fields and their settings via field UI.

Code

protected function _testRangeFieldCreationUI($field_type = 'range_integer') {
  $this
    ->drupalGet("admin/structure/types/manage/{$this->contentType}/fields");
  $edit = array(
    'fields[_add_new_field][label]' => $this
      ->randomName(),
    'fields[_add_new_field][field_name]' => $this
      ->getTestFieldNameRaw($field_type),
    'fields[_add_new_field][type]' => $field_type,
    'fields[_add_new_field][widget_type]' => 'range',
  );
  $this
    ->drupalPost(NULL, $edit, t('Save'));
}