protected function EntityResolverTest::setUp

Sets up Drupal unit test environment.

Overrides NormalizerTestBase::setUp

See also

DrupalUnitTestBase::$modules

DrupalUnitTestBase

File

drupal/core/modules/serialization/lib/Drupal/serialization/Tests/EntityResolverTest.php, line 33
Contains \Drupal\serialization\Tests\EntityResolverTest.

Class

EntityResolverTest

Namespace

Drupal\serialization\Tests

Code

protected function setUp() {
  parent::setUp();

  // Create the test field.
  $field = array(
    'settings' => array(
      'target_type' => 'entity_test_mulrev',
    ),
    'field_name' => 'field_test_entity_reference',
    'type' => 'entity_reference',
  );
  field_create_field($field);

  // Create the test field instance.
  $instance = array(
    'entity_type' => 'entity_test_mulrev',
    'field_name' => 'field_test_entity_reference',
    'bundle' => 'entity_test_mulrev',
  );
  field_create_instance($instance);
}