You are here

function DateUITest::createDateField in Date 8

Same name in this branch
  1. 8 lib/Drupal/date/Tests/DateUITest.php \Drupal\date\Tests\DateUITest::createDateField()
  2. 8 date_field/lib/Drupal/date_field/Tests/DateUITest.php \Drupal\date\Tests\DateUITest::createDateField()

@todo.

2 calls to DateUITest::createDateField()
DateUITest::testFieldUI in lib/Drupal/date/Tests/DateUITest.php
@todo.
DateUITest::testFieldUI in date_field/lib/Drupal/date_field/Tests/DateUITest.php
@todo.

File

date_field/lib/Drupal/date_field/Tests/DateUITest.php, line 104
Test date UI.

Class

DateUITest

Namespace

Drupal\date\Tests

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