public function ShapeItemTest::setUp

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

Overrides FieldUnitTestBase::setUp

File

drupal/core/modules/field/lib/Drupal/field/Tests/ShapeItemTest.php, line 33
Contains \Drupal\field\Tests\ShapeItemTest.

Class

ShapeItemTest
Tests the new entity API for the shape field type.

Namespace

Drupal\field\Tests

Code

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

  // Create an field field and instance for validation.
  $this->field = array(
    'field_name' => 'field_shape',
    'type' => 'shape',
  );
  field_create_field($this->field);
  $this->instance = array(
    'entity_type' => 'entity_test',
    'field_name' => 'field_shape',
    'bundle' => 'entity_test',
  );
  field_create_instance($this->instance);
}