You are here

protected function EntityBlockItemTest::setUp in Entityblock 8

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

Overrides FieldKernelTestBase::setUp

File

tests/src/Kernel/EntityBlockItemTest.php, line 26

Class

EntityBlockItemTest
Tests the new entity API for the entityblock field type.

Namespace

Drupal\Tests\entityblock\Kernel

Code

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

  // Create an entityblock field for validation.
  FieldStorageConfig::create(array(
    'field_name' => 'field_test',
    'entity_type' => 'entity_test',
    'type' => 'entityblock',
  ))
    ->save();
  FieldConfig::create(array(
    'entity_type' => 'entity_test',
    'field_name' => 'field_test',
    'bundle' => 'entity_test',
  ))
    ->save();
}