1 field_views.test FieldViewsTestHelper::setUpInstances($bundle = 'page')

File

core/modules/field/tests/field_views.test, line 76
Tests the Views integration with Field API.

Class

FieldViewsTestHelper
Provides some helper methods for testing fieldapi integration into views.

Code

function setUpInstances($bundle = 'page') {
  foreach ($this->fields as $key => $field) {
    $instance = array(
      'field_name' => $field['field_name'],
      'entity_type' => 'node',
      'bundle' => 'page',
    );
    $this->instances[$key] = field_create_instance($instance);
  }
}