You are here

protected function MicrodataReferenceFieldsTestCase::getInstances in Microdata 7

Implements MicrodataFieldTestCase::getInstances().

Overrides MicrodataFieldTestCase::getInstances

File

./microdata.test, line 619
Tests for microdata.module.

Class

MicrodataReferenceFieldsTestCase
Test Field Collection microdata placement.

Code

protected function getInstances() {

  // Create instances for the field collection and for the field group.
  $instances = array();
  foreach ($this->field_names as $field_name => $subfield_name) {
    $instances[] = array(
      'field_name' => $field_name,
      'entity_type' => $this->entityType,
      'bundle' => $this->bundleType,
      'widget' => array(
        'type' => 'hidden',
        'label' => 'Test',
        'settings' => array(),
      ),
    );
    $instances[] = array(
      'entity_type' => 'field_collection_item',
      'field_name' => $subfield_name,
      'bundle' => $field_name,
      'label' => 'Test text field',
      'widget' => array(
        'type' => 'text_textfield',
      ),
    );
  }
  return $instances;
}