You are here

public function DateToolsTest::testTools in Date 8

Creates a date field using the Date Wizard.

File

date_tools/lib/Drupal/date_tools/Tests/DateToolsTest.php, line 49
Tests for Date Tools.

Class

DateToolsTest

Namespace

Drupal\date_tools\Tests

Code

public function testTools() {
  $form_values = array(
    'label' => 'Test',
    'field_type' => 'datetime',
    'widget_type' => 'date_select',
    'todate' => '',
  );
  $this
    ->createDateWizard($form_values);
  $this
    ->dateForm($options = 'select');
  $this
    ->assertText('Thu, 10/07/2010 - 10:30', 'Found the correct date for the Date Wizard datetime field using the date_select widget.');
  $this
    ->deleteDateField();
}