You are here

public function DateToolsTestCase::createDateWizard in Date 7.3

Same name and namespace in other branches
  1. 7 date_tools/tests/date_tools.test \DateToolsTestCase::createDateWizard()
  2. 7.2 date_tools/tests/DateToolsTestCase.test \DateToolsTestCase::createDateWizard()

Creates a date field using the Date Wizard.

1 call to DateToolsTestCase::createDateWizard()
DateToolsTestCase::testTools in date_tools/tests/DateToolsTestCase.test
Creates a date field using the Date Wizard.

File

date_tools/tests/DateToolsTestCase.test, line 110
Tests for Date Tools.

Class

DateToolsTestCase
Tests for Date Tools.

Code

public function createDateWizard($edit) {
  $edit += array(
    'bundle' => 'story',
    'name' => 'Story',
    'type_description' => 'A test content type.',
    'field_name' => 'test',
    'label' => 'Test',
    'widget_type' => 'date_select',
    'todate' => 'optional',
    'field_type' => 'date',
    'granularity[]' => array(
      'year',
      'month',
      'day',
      'hour',
      'minute',
    ),
    'tz_handling' => 'site',
    'year_range' => '2010:+2',
    'weight' => -100,
  );
  $this
    ->drupalPost('admin/config/date/tools/date_wizard', $edit, t('Save'));
  $this
    ->assertText('Your date field Test has been created.', 'Create a date field using the Date Wizard.');
}