You are here

function FieldTestBase::setUpInstances in Views (for Drupal 7) 8.3

1 call to FieldTestBase::setUpInstances()
HandlerFieldFieldTest::setUp in lib/Drupal/views/Tests/Field/HandlerFieldFieldTest.php
Sets up a Drupal site for running functional and integration tests.

File

lib/Drupal/views/Tests/Field/FieldTestBase.php, line 52
Definition of Drupal\views\Test\Field\FieldTestBase.

Class

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

Namespace

Drupal\views\Tests\Field

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);
  }
}