function FieldAttachTestCase::setUp

7.x field.test FieldAttachTestCase::setUp()

Set the default field storage backend for fields created during tests.

Overrides FieldTestCase::setUp

File

drupal-7.x/modules/field/tests/field.test, line 75
Tests for field.module.

Class

FieldAttachTestCase

Code

function setUp() {
  // Since this is a base class for many test cases, support the same
  // flexibility that DrupalWebTestCase::setUp() has for the modules to be
  // passed in as either an array or a variable number of string arguments.
  $modules = func_get_args();
  if (isset($modules[0]) && is_array($modules[0])) {
    $modules = $modules[0];
  }
  if (!in_array('field_test', $modules)) {
    $modules[] = 'field_test';
  }
  parent::setUp($modules);

  $this->createFieldWithInstance();
}