You are here

protected function DateTestCase::getFields in Microdata 7

Implements MicrodataFieldTestCase::getFields().

Overrides MicrodataFieldTestCase::getFields

File

modules/date/date.test, line 44
Tests for Date module.

Class

DateTestCase
Test Date module microdata placement.

Code

protected function getFields() {

  // Create fields for each date type.
  $fields = array();
  foreach ($this->dateTypes as $date_type) {
    foreach ($this->fieldFormatterTypes as $type) {
      $fields[] = array(
        'field_name' => "{$date_type}_{$type}",
        'type' => $date_type,
        'settings' => array(
          'todate' => 'optional',
        ),
      );
    }
  }

  // Create an extra one for testing the single date formatter.
  $fields[] = array(
    'field_name' => 'single_date',
    'type' => 'datestamp',
    'settings' => array(
      'todate' => FALSE,
    ),
  );
  return $fields;
}