You are here

protected function FieldValidationTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Tests/FieldValidationTest.php \Drupal\field\Tests\FieldValidationTest::setUp()

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

Overrides FieldUnitTestBase::setUp

File

core/modules/field/src/Tests/FieldValidationTest.php, line 32
Contains \Drupal\field\Tests\FieldValidationTest.

Class

FieldValidationTest
Tests field validation.

Namespace

Drupal\field\Tests

Code

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

  // Create a field and storage of type 'test_field', on the 'entity_test'
  // entity type.
  $this->entityType = 'entity_test';
  $this->bundle = 'entity_test';
  $this
    ->createFieldWithStorage('', $this->entityType, $this->bundle);

  // Create an 'entity_test' entity.
  $this->entity = entity_create($this->entityType, array(
    'type' => $this->bundle,
  ));
}