function FieldTestCase::setUp

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

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

Overrides DrupalWebTestCase::setUp

13 calls to FieldTestCase::setUp()
EntityPropertiesTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldAttachTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldBulkDeleteTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldCrudTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldDisplayAPITestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.

... See full list

13 methods override FieldTestCase::setUp()
EntityPropertiesTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldAttachTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldBulkDeleteTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldCrudTestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.
FieldDisplayAPITestCase::setUp in drupal-7.x/modules/field/tests/field.test
Set the default field storage backend for fields created during tests.

... See full list

File

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

Class

FieldTestCase
Parent class for Field API tests.

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];
  }
  parent::setUp($modules);
  // Set default storage backend.
  variable_set('field_storage_default', $this->default_storage);
}