You are here

function DateUITestCase::createDateField in Date 7

1 call to DateUITestCase::createDateField()
DateUITestCase::testFieldUI in tests/date.test

File

tests/date.test, line 121

Class

DateUITestCase

Code

function createDateField($type, $widget) {
  $edit = array();
  $edit['fields[_add_new_field][label]'] = 'Test';
  $edit['fields[_add_new_field][field_name]'] = 'test';
  $edit['fields[_add_new_field][weight]'] = '-4';
  $edit['fields[_add_new_field][type]'] = $type;
  $edit['fields[_add_new_field][widget_type]'] = $widget;
  $this
    ->drupalPost('admin/structure/types/manage/story/fields', $edit, t('Save'));
}