public function TelephoneItemTest::setUp

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

Overrides FieldUnitTestBase::setUp

File

drupal/core/modules/telephone/lib/Drupal/telephone/Tests/TelephoneItemTest.php, line 34
Contains \Drupal\field\Tests\TelephoneItemTest.

Class

TelephoneItemTest
Tests the new entity API for the telephone field type.

Namespace

Drupal\telephone\Tests

Code

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

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