You are here

function DateValidationTestCase::createDateField in Date 7

1 call to DateValidationTestCase::createDateField()
DateValidationTestCase::testValidation in tests/date_validation.test

File

tests/date_validation.test, line 105

Class

DateValidationTestCase

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'));
}