protected function DateTestCase::getInstances in Microdata 7
Implements MicrodataFieldTestCase::getInstances().
Overrides MicrodataFieldTestCase::getInstances
File
- modules/
date/ date.test, line 72 - Tests for Date module.
Class
- DateTestCase
- Test Date module microdata placement.
Code
protected function getInstances() {
// Create instances for the field collection and for the field group.
$instances = array();
foreach ($this->dateTypes as $date_type) {
foreach ($this->fieldFormatterTypes as $type) {
$instances[] = array(
'field_name' => "{$date_type}_{$type}",
'entity_type' => $this->entityType,
'bundle' => $this->bundleType,
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => $type,
),
),
);
}
}
$instances[] = array(
'field_name' => "single_date",
'entity_type' => $this->entityType,
'bundle' => $this->bundleType,
'display' => array(
'default' => array(
'label' => 'hidden',
'type' => 'default',
),
),
);
return $instances;
}